generator-angular-scalable

0.2.6 • Public • Published

generator-angular-scalable NPM version Dependency Status

Scaffolding for large apps

Installation

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

Directory organisation

- 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

Some features

Working with different APIS

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 API
  • grunt ngconstant:beta to work with your beta API
  • Or grunt serve:dev to serve directly with that API

Extra options

  • Bootstrap
  • Protractor
  • Json server (for mocks)
  • Restangular

Other notes

  • 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 using grunt includeSources. If you manually remove a module, you should also remove it from this variable, otherwise the task will attemp to create the file.

Getting To Know Yeoman

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.

License

BSD-2-Clause-FreeBSD © Unai Recio

Readme

Keywords

Package Sidebar

Install

npm i generator-angular-scalable

Weekly Downloads

0

Version

0.2.6

License

BSD-2-Clause-FreeBSD

Last publish

Collaborators

  • srcrustaceo