Fountain Angular 2 Generator
Fountain Angular 2 Generator allows you to start an Angular2 web app with the best developer experience possible!
No matter what framework or module management you want to use, we got you covered with a cutting edge working configuration.
We use Gulp 4 as a task manager but we'll ask you questions about:
- Modules management: Webpack, SystemJS, none
- JS preprocessor: Babel, TypeScript, none
- CSS preprocessor: Sass, Stylus, Less, none
This generator is a sub-generator of the the Yeoman Fountain generator for webapps generator-fountain-webapp.
Generator Fountain Angular 2 structure
To utilize the best of the Yeoman infrastructure, we heavily rely on the composability features that the generators offer.
Thereby, each requirement for your application will be addressed by a dedicated Yeoman generator (generators utilized will vary depending on the options selected).
Additional information: DESIGN.md.
Web tooling layer
Module management layer
Requirement Node 6+ && NPM 3+
This generator is targeted to be used with Node >= 6.0.0 and NPM => 3.0.0. You can check your version number with the command
node --version && npm --version
Install required tools
npm install -g yo
npm install -g generator-fountain-angular2
Create a new directory, and go into:
mkdir my-new-project && cd my-new-project
yo fountain-angular2, and select desired technologies:
Use NPM scripts
npm run buildto build an optimized version of your application in /dist
npm run serveto launch a browser sync server on your source files
npm run serve:distto launch a server on your optimized application
npm run testto launch your unit tests with Karma
npm run test:autoto launch your unit tests with Karma in watch mode
Or Gulp tasks
If you have
gulp-cli installed in global packages you can use equivalent:
If you don't have
gulp-cli installed globally, the following error will occur:
/usr/local/lib/node_modules/gulp/bin/gulp.js:121 gulpInst.start.apply(gulpInst, toRun); TypeError: Cannot read property 'apply' of undefined
Few sub-generators are available. You can see the full list by running
Each generator has 2 options:
- You can set the name of the generated item with
- You can set the path of the generated item with
yo fountain-angular2:component --name myComponent --dir components/game