Git Product home page Git Product logo

react-npm-circleci-boilerplate's Introduction

Known Vulnerabilities License: MIT

React, NPM and CircleCI Boilerplate

Boilerplate template for building npm modules with React and JSX. Also includes a script from CircleCI to deploy to AWS S3.

  1. Run a testing server for local development.
  2. Build with babel and webpack for production ready code.
  3. Use CircleCI to deploy to AWS S3.

Getting Started

Clone the repo.

$ git clone https://github.com/sallf/react-npm-boilerplate.git

Install packages.

$ npm install

Development

We're using Hot Module Replacement (HMR), with webpack-dev-server. HMR exchanges, adds, or removes modules while an application is running, without a full reload which can significantly speed up development

$ npm start

Build

Compiles code to public/ folder.

$ npm run dev

Deploy to AWS

This template includes a config.yml file which will help you deploy to your AWS S3 bucket. If you don't need this functionality, just delete the .circleci/ folder.

After you've followed the setup steps below, any merge to master branch should trigger a buid on CircleCI.

Setup a CircleCI Account

You'll need to setup an account with CircleCI and link to your GitHub account.

Add Access Keys to CircleCI

In your CircleCI account you'll need to add your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as Environment Variables in a Context called AWS (Organization Settings > Contexts > Create Context). If you name your Context something different, be sure to update the context value in the .circleci/confg.yml file.

You can create access keys on AWS through your IAM profile.

Configure yml File

We'll be using CircleCI's new aws-s3 orb which does most of the heavy lifting.

  1. By default the file is setup to track your master branch. Adjust this as needed.
  2. Add your S3 bucket URL to the last line in the file.

Packages

Dependencies

Dev Dependencies

License

The code is available under the MIT license.

react-npm-circleci-boilerplate's People

Contributors

dependabot[bot] avatar sallf avatar snyk-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.