generator-angularjs-skeleton v1.0.0-rc.1
Generator of AngularJS project skeleton based on Hottowel generator.
The key differences:
- task for angular files generation (controllers, models, directives etc.)
- replaced LESS with SASS
- used decorator which blocks duplicate requests
Preconditions
- Install Node.js
Install next NPM modules globally
npm install -g bower gulp nodemonInstall Yeoman
npm install -g yo
Quick Start
Install generator-angularjs-skeleton
npm install -g generator-angularjs-skeletonCreate a new folder for project and step inside it
mkdir myapp cd myappRun the generator
yo angularjs-skeletonInstall dependencies
npm installStart the project and begin coding
gulp serve-dev
Project structure
/src
/client
/app
/core <!-- main module and config files -->
/routes <!-- route files -->
/models <!-- factories -->
/directives <!-- folder with directives -->
/components <!-- folder with components -->
/filters <!-- folder with filters -->
<!-- folders with controllers and corresponding views -->
/main
/dashboardGulp tasks
gulp generateUse gulp tasks listed below to generate your controllers, models, routes etc. easily.
gulp generate --controller controller_name- will add folder for controller (if it does not exist) and generate controller with nameControllerNameControllergulp generate --model model_name- will add filemodel_name.model.jstomodelsfolder and generate model with nameModelNameModelgulp generate --model route_file_name- will add fileroute_file_name.route.jstoroutesfoldergulp generate --directive directive_name- will add filedirective_name.directive.jstodirectivesfolder and generate directive with namedirectiveNamegulp generate --module module_name- - will add folder for module (if it does not exist) and generate module with module namemodule_nameYou can add
--module [module_name]to all generators (except module generator) to attach a file to specified module. By default it will be attached toapp.core
gulp vetRuns jshint and jscs on all javascript files.
gulp testRuns all unit tests (using Karma runner and next frameworks: mocha, chai and sinon).
gulp stylesCompile scss files to CSS and copy to the build folder
gulp serve-devServes the development code and launches it in a browser. The goal of building for development is to do it as fast as possible, to keep development moving efficiently. This task serves all code from the source folders and compiles sass to css in a temp folder.
gulp buildCopies all fonts, copies images and runs
gulp htmlto build the production code to the build folder.gulp serve-buildServe the optimized code from the build folder and launch it in a browser.
TODOs
- writing more detailed documentation
- generator tests implementation
License
MIT
8 years ago
8 years ago