README
Yeoman generator for an Angular project based on my own seed project (https://github.com/froko/froko-angular-seed)
Installation
First, install Yeoman and generator-froko-angular-seed using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-froko-angular-seed
Then create a new directory, change into and generate your new Angular application:
mkdir my-awesome-angular-app
cd my-awesome-angular-app
yo froko-angular-seed
The generator will ask you the following questions:
- Your project name
text
- Your project description
text
- Your component prefix
text
- Include HTTP client?
Yes/No
- Include forms?
Yes/No
- Include routing?
Yes/No
- Include ngrx & HMR?
Yes/No
- Include e2e tests with protractor?
Yes/No
- Include a CSS framework?
Yes/No
- Which one do you want to use?
choice: Bootstrap|MaterialDesign
- Your GitHub user name
text
- Your GitHub repository
text
Usage
Start the application
Run npm start
and open your browser at http://localhost:3000
Test the application
Run npm test
to test the application in a single run. If you prefer continous testing, run npm test:watch
.
Run npm test:e2e
to run the end-to-end tests with protractor. Make sure that the application was previously built into the dist folder.
Build the application
Run npm run build
to create a production-ready AOT version of the web application.
All necessary files are being written into the dist folder. This is the unit of deployment which you can use with a web server of your choice, e.g. IIS or Apache.
Create a new component
Run yo froko-angular-seed:component
or npm run new-component
to create a new component. The wizard will ask you a few questions about the name and the final place of the new component and whether it should create a CSS style sheet file for the new component.
Please remember to register your new component in the corresponding Angular module's declarations array, since this generator will never update your existing files.
Create a new service
Run yo froko-angular-seed:service
or npm run new-service
to create a new service. The wizard will ask you a few questions about the name and the final place of the new service.
Please remember to register your new service in the corresponding Angular module's providers array, since this generator will never update your existing files.
Create a new module
Run yo froko-angular-seed:module
or npm run new-module
to create a new module. The wizard will ask you a few questions about the name and the final place of the new module and whether it should create a service and a CSS style sheet for the containing component.
Please remember to register your new module in the corresponding Angular module's imports array, since this generator will never update your existing files.
License
MIT © Patrick Ineichen