Scaffolding for large apps
First, install Yeoman and generator-angular-scalable using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-angular-scalable
Then generate your new project:
yo angular-scalable
Available subgenerators:
yo angular-scalable:module
yo angular-scalable:controller
yo angular-scalable:directive
yo angular-scalable:view
yo angular-scalable:filter
yo angular-scalable:factory
yo angular-scalable:service
yo angular-scalable:stylesheet
- app
/ assets
/ common
/ app
/ components
/ component1
/ component1.module.js
/ component1.module.spec.js
/ styles
/ module.styles
/ component1.scss (stylesheet)
/ imports (components stylesheets)
/ component1.scss (stylesheet)
/ controllers
/ component.controller.js
/ component.controller.spec.js
/ directives
/ component.directive.js
/ component.directive.spec.js
/ services
/ component.service.js
/ component.service.spec.js
/ views
/ component.view.html
/ Test
/ karma.conf.js
/ coverage
There is a grunt task to setup a constant with the base url of those APIs, so that you can run:
grunt ngconstant:dev
to work with your alpha APIgrunt ngconstant:beta
to work with your beta API- Or
grunt serve:dev
to serve directly with that API
- Bootstrap
- Protractor
- Json server (for mocks)
- Restangular
- When you create a module with styles, it will update the
includeSourceFiles
variable in the Gruntfile. This is to automatically include sub partials into the main stylesheet of the module usinggrunt includeSources
. If you manually remove a module, you should also remove it from this variable, otherwise the task will attemp to create the file.
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced. Feel free to learn more about him.
BSD-2-Clause-FreeBSD © Unai Recio