A Yeoman generator for Modern Web development projects
ModernWebDevGenerator is a Yeoman generator that will help you quickly get up and running with ModernWebDevBuild.
Projects created with this Yeoman Generator will be able to directly leverage the awesome Gulp-based build provided by the ModernWebDevBuild project, which includes many tasks and features out of the box (e.g., transpilation of TypeScript/ES2015 to ES5, SASS transpilation to CSS, Minification, Bundling, Code quality & code style checks, Sourcemaps, support for unit testing, …).
This project comes with a fully working Angular 2 configuration.
This generator includes all the folders & files listed by ModernWebDevBuild as mandatory as well as the recommended ones so as to promote good practices. README.md files are placed in multiple locations to describe what to put where, provide some guidance/design guidelines, …
The generated projects also include:
The general idea is that you can remove anything you don’t need assuming it’s not in the list of mandatory folders/files of ModernWebDevBuild (otherwise you’ll break the build ^^).
Any feedback/contributions are welcome to improve the project so don’t hesitate!
This project is available as an NPM package; check out the usage instructions below.
Click on this link to see a demo of how to install & use this project and the modern web dev build:
Please note that this project is heavily inspired from:
Check out the issues/labels & milestones to get an idea of what’s next.
For existing features, refer to the previous sections.
Check out the change log
In order to use this generator you first need to install Yeoman:
npm install --global yo
Once Yeoman is installed, you can install this generator:
npm install --global generator-modern-web-dev
You will also need to install gulp globally:
npm install --global gulp
Create a new folder, go into it then invoke the generator by running the following command:
yo modern-web-dev
Once you’ve answered all the questions, the generator will do its thing.
Once done, you’ll be able to run the development web server and start hacking away using:
npm start
Enjoy!
Note that the ModernWebDevBuild project has other tricks in store for you; be sure to check out the docs.
There are two main approaches to use this generator:
In practice nothing prevents you from mixing both though 😃
If you pass a setting directly to the generator, it will not prompt you for that value.
You can list all the options with a brief description using yo modern-web-dev --help
.
By default, the generator will install all project dependencies (not the global requirements listed in the ‘Usage’ section!). You can skip the installation of the project dependencies by passing the --skip-install
option.
The generator will check for updates once in a while but you can disable the update check by passing the following flag: --no-update-notifier
.
The following dependencies are managed by JSPM (in the JSPM section of the package.json file):
The project includes multiple configuration files.
For more details about the configuration files, check out the ModernWebDevBuild’s documentation.
Here’s some high level information about these:
As you go along, you’ll surely need to add new dependencies for your application. If the dependency you want to add is required at runtime, then you should use JSPM to add it.
Installing a dependency with JSPM is as simple as jspm install x
. For more information about JSPM, check out the official site: http://jspm.io/
Take a look at the project’s open issues and milestones.
If you know what to do then:
If you want to build from source, you need to:
npm install --global gulp
npm run setup
This project and all associated source code is licensed under the terms of the MIT License.