Generates a quick webpack bootstrap web application for prototyping
npm install -g yo npm install -g generator-webpack-quick
Then generate your new project:
To start, just run :
This will automatically open your browser and start the webpack-development-server, which refreshes your build on file change.
But Why ?
There are loads of generators for webpack and react, but all of them focus on large scale production applications, and are generally overkill when wanting to experiment around, or maybe make something simple. The fact of the matter is, you dont have to use complex architecture or a gigantic project structure to get a simple project up and running, but at the same time, its still quite a task to get even simple boilerplate for running ES6 or React. This generator :
- Comes prepackaged with
.jshintrcfor code quality.
- Sourcemaps included.
- Has the option for installing jsx plugins in case you want to use react.
- Has the option of including sass.
- Uses only webpack and npm scripts for all build tasks.
Deploying a web application
Just run :
npm run build
And your website is ready to go, with minified and concatenated scripts. Just push to the
gh-pages branch of your repo and view your site online.
MIT © sohamkamani