- One command to get started - Type
npm start
to start development in your default browser. - Rapid feedback - Each time you hit save, changes hot reload and linting and automated tests run.
- One command line to check - All feedback is displayed on a single command line.
- No more JavaScript fatigue - Slingshot uses the most popular and powerful libraries for working with React.
- Working example app - The included example app shows how this all works together.
- Automated production build - Type
npm run build
to do all this:
- Initial Machine Setup. First time running the starter kit? Then complete the Initial Machine Setup.
- Clone the project.
git clone https://github.com/coryhouse/react-slingshot.git
. - Run the setup script.
npm run setup
- Run the example app.
npm start -s
This will run the automated build process, start up a webserver, and open the application in your default browser. When doing development with this kit, this command will continue watching all your files. Every time you hit save the code is rebuilt, linting runs, and tests run automatically. Note: The -s flag is optional. It enables silent mode which suppresses unnecessary messages during the build. 5. Review the example app. This starter kit includes a working example app that calculates fuel savings. Note how all source code is placed under /src. Tests are placed alongside the file under test. The final built app is placed under /dist. These are the files you run in production. 6. Delete the example app files. Once you're comfortable with how the example app works, you can delete those files and begin creating your own app. 7. Having issues? See "Having Issues?" below.
- Install Node 4.0.0 or greater - (5.0 or greater is recommended for optimal build performance). Need to run multiple versions of Node? Use nvm.
- Install Git.
- Disable safe write in your editor to assure hot reloading works properly.
- On a Mac? You're all set. If you're on Linux or Windows, complete the steps for your OS below.