Get your React project up and running in 10 seconds with Webpack hot reloading. Boilerplate code is based on Dan Abramov's React Transform Boilerplate.
10 second method:
npm install -g code-slingercode-slinger bootstrapcode-slinger react-server
You get this file structure:
├── .babelrc ├── .eslintrc ├── .gitignore ├── dist ├── index.html ├── node_modules ├── package.json └── src ├── App.js ├── colors.js └── index.js
Need a production build?
# Bundle is dropped in dist/code-slinger build
# Install code-slinger and save itnpm install --save code-slinger# Bootstrap the files./node_modules/.bin/code-slinger bootstrap
Add this to package.json
// ..."scripts":"start": "code-slinger react-server""build": "code-slinger build"// ...
Want to run a production bundle build?
# Bundle is dropped in dist/npm run build
Want your own config.webpack.js file to be used?
# Optional: generate a config.webpack.js./node_modules/.bin/code-slinger gen-webpack# Either way make sure you have a config named# config.webpack.js in Project Root
Note: For any arbitrary Webpack config to work with code-slinger: Please replace
process.cwd() in the config file
Usage: code-slinger <command> [options] Commands: bootstrap Generate files for running a React project react-server Run the hot reloading development server for your project on localhost:8000 build Bundle and export your React app to dist/bundle.js gen-webpack Generates a custom webpack file to be modified for custom Webpack builds. Options: -h, --help Show help [boolean] MIT License. Lead Maintainer: Michael A Tomcal @matomcal 2016
Primary libraries used:
- RxJS 5
- Babel 6
...see package.json for more supporting libraries
- User supplied config.webpack.js works with
- Bug fix for cannot find module when looking for config.webpack.js
- Added convention for a user supplying their own config.webpack.js
- Added code-slinger gen-webpack command to generate a webpack file
We welcome contributions, pull requests, ideas, bugs and documentation contributions.