ngnew v0.0.20
This is a command line tool and a gulp/grunt module to create files and folders for angular modules, services, factories... Files are generated in order to be compiled with browserify and tested with karma and jasmine
notes : -fix installation on mac & linux -added index file to use with gulp or grunt or whatever, only to create modules for now -missing some replacements in generated files
for command line tool : install in global : npm install -g ngnew
use : type in terminal :
ngnew --module moduleName --service(optional) --factory(optional) --directive(optional) --controller(optional)
to create a new module in a new folder in current folder with test files associated in /tests folder
ngnew --service serviceName
to create a service in current folder with test file associated in /tests folder
ngnew --factory factoryName
to create a factory in current folder with test file associated in /tests folder
ngnew --controller controllerName
to create a controller, a view and it's scss file in current folder with test file associated in /tests folder
ngnew --directive directiveName
to create a directive, a controller and it's test, the associated view and scss file in current folder
for gulp/grunt use : install in for dev : npm install --save-dev ngnew
in your gulpFile :
var gulp = require('gulp-param')(require('gulp'), process.argv);
var ngnew = require('ngnew');
gulp.task('ngnew', function () {
ngnew({
base : './app',
module : argv.module,
service : argv.service,
factory : argv.factory,
controller : argv.controller,
directive : argv.directive
})
});
//base is the root folder of your angular app
//uses this folder hierarchy : app/module/submodule...
use : type in terminal :
gulp ngnew --module app.foo.bar --service
to create a new bar module in app/foo/ with a bar service
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago