Skip to content

Commit

Permalink
Merge pull request #193 from thaiat/update-version
Browse files Browse the repository at this point in the history
  • Loading branch information
thaiat committed Jun 7, 2015
2 parents 185e0e2 + c5dd6af commit d8924e6
Show file tree
Hide file tree
Showing 20 changed files with 92 additions and 120 deletions.
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var AppGenerator = Class.extend({
}, {
name: 'ngCordova',
type: 'confirm',
message: 'Would you like to include ngCordova?',
message: 'Would you like to include ng-cordova?',
default: true
}, {
name: 'material',
Expand Down
6 changes: 6 additions & 0 deletions class/component.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*eslint no-process-exit:0*/
'use strict';

var path = require('path');
Expand Down Expand Up @@ -109,6 +110,7 @@ var ComponentGenerator = Class.extend({
}];
this.prompt(prompts, function(answers) {
that.modulename = that.modulename || answers.modulename;

that.modulename = that.camelize(that.modulename);
that.moduleFolder = that.casify(that.modulename);
that[_templateFolder + 'name'] = that[_templateFolder + 'name'] || answers[_templateFolder + 'name'];
Expand All @@ -118,6 +120,10 @@ var ComponentGenerator = Class.extend({
},

writing: function() {
if(!_.contains(this.clientModules, this.modulename)) {
this.log(this.utils.chalk.red('Error: ') + 'The module name ' + this.utils.chalk.yellow(this.modulename) + ' does not exist');
return;
}
var done = this.async();
this.sourceRoot(path.join(__dirname, '../templates/' + this.templateFolder));
var targetDir = path.join(this.clientFolder, 'scripts', this.moduleFolder, this.localFolder);
Expand Down
5 changes: 5 additions & 0 deletions directive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var path = require('path');
var utils = require('../utils');
var Class = require('../class/component.js')('directives', 'directive');
var _ = require('lodash');

var DirectiveGenerator = Class.extend({
constructor: function() {
Expand Down Expand Up @@ -39,6 +40,10 @@ var DirectiveGenerator = Class.extend({
},

writing: function() {
if(!_.contains(this.clientModules, this.modulename)) {
this.log(this.utils.chalk.red('Error: ') + 'The module name ' + this.utils.chalk.yellow(this.modulename) + ' does not exist');
return;
}
var done = this.async();
this.sourceRoot(path.join(__dirname, '../templates/' + 'directive'));
var targetDir = path.join(this.clientFolder, 'scripts', this.moduleFolder, 'directives');
Expand Down
5 changes: 2 additions & 3 deletions gulp_tasks/common/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var fs = require('fs');
var gutil = require('gulp-util');
var chalk = require('chalk');
var stripJsonComments = require('strip-json-comments');
var _ = require('lodash');
var path = require('path');
Expand All @@ -25,13 +24,13 @@ var isMobile = exports.isMobile = function(constants) {
*/
var execHandler = exports.execHandler = function(err, stdout, stderr) {
if(err) {
gutil.log(chalk.red('An error occured executing a command line action'));
gutil.log(gutil.colors.red('An error occured executing a command line action'));
}
if(stdout) {
gutil.log(stdout);
}
if(stderr) {
gutil.log(chalk.red('Error: ') + stderr);
gutil.log(gutil.colors.red('Error: ') + stderr);
}
};

Expand Down
4 changes: 2 additions & 2 deletions gulp_tasks/tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ var github = new GitHubApi({
timeout: 0
});

var gitGetEmailAsync = Q.nbind(git.exec, git, {
var gitGetEmailAsync = Q.denodeify(git.exec, {
args: 'config --get user.email',
quiet: true
});
var githubUsernameAsync = Q.nfbind(githubUsername);
var githubUsernameAsync = Q.denodeify(githubUsername);

var inquireAsync = function(result) {
var deferred = Q.defer();
Expand Down
3 changes: 1 addition & 2 deletions gulp_tasks/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var mocha = $.mocha;
var istanbul = $.istanbul;
var karma = $.karma;
var gutil = require('gulp-util');
var chalk = require('chalk');

var constants = require('../common/constants')();

Expand Down Expand Up @@ -37,7 +36,7 @@ gulp.task('karma', function() {
configFile: 'karma.conf.js',
action: 'run'
})).on('error', function() {
gutil.log(chalk.red('(ERROR)'), 'karma');
gutil.log(gutil.colors.red('(ERROR)'), 'karma');
});
});

Expand Down
70 changes: 35 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,56 +47,56 @@
"scaffold"
],
"dependencies": {
"chalk": "0.5.1",
"del": "1.1.1",
"chalk": "1.0.0",
"del": "1.2.0",
"glob-to-regexp": "0.0.2",
"gulp": "3.8.10",
"gulp-inject": "1.1.1",
"gulp": "3.9.0",
"gulp-inject": "1.2.0",
"gulp-mux": "latest",
"lodash": "2.4.1",
"q": "1.1.2",
"shelljs": "0.3.0",
"update-notifier": "0.3.0",
"q": "1.4.1",
"shelljs": "0.5.1",
"update-notifier": "0.5.0",
"yeoman-generator": "0.17.7",
"yosay": "1.0.2"
"yosay": "1.0.4"
},
"devDependencies": {
"chai": "1.10.0",
"conventional-changelog": "0.0.11",
"github": "0.2.3",
"github-username": "1.1.1",
"gulp-bump": "0.1.13",
"gulp-concat": "2.4.3",
"gulp-eslint": "0.2.2",
"chai": "3.0.0",
"conventional-changelog": "0.0.17",
"github": "0.2.4",
"github-username": "2.0.0",
"gulp-bump": "0.3.1",
"gulp-concat": "2.5.2",
"gulp-eslint": "0.13.2",
"gulp-exec": "2.1.1",
"gulp-git": "0.5.6",
"gulp-help": "1.3.2",
"gulp-git": "1.2.4",
"gulp-help": "1.4.0",
"gulp-if": "1.2.5",
"gulp-istanbul": "0.6.0",
"gulp-jscs": "1.4.0",
"gulp-jshint": "1.9.2",
"gulp-load-plugins": "0.8.0",
"gulp-mocha": "2.0.0",
"gulp-plumber": "0.6.6",
"gulp-istanbul": "0.9.0",
"gulp-jscs": "1.6.0",
"gulp-jshint": "1.11.0",
"gulp-load-plugins": "0.10.0",
"gulp-mocha": "2.1.1",
"gulp-plumber": "1.0.1",
"gulp-tap": "0.1.3",
"gulp-util": "3.0.3",
"inquirer": "0.8.0",
"jshint-stylish": "1.0.0",
"gulp-util": "3.0.5",
"inquirer": "0.8.5",
"jshint-stylish": "2.0.0",
"map-stream": "0.1.0",
"mocha": "2.1.0",
"mocha-lcov-reporter": "0.0.1",
"mocha": "2.2.5",
"mocha-lcov-reporter": "0.0.2",
"mockery": "1.4.0",
"node-jsxml": "0.6.0",
"require-dir": "0.1.0",
"run-sequence": "1.0.2",
"sinon": "1.12.2",
"stream-combiner": "0.2.1",
"streamqueue": "0.1.1",
"require-dir": "0.3.0",
"run-sequence": "1.1.0",
"sinon": "1.14.1",
"stream-combiner": "0.2.2",
"streamqueue": "0.1.3",
"strip-json-comments": "1.0.2",
"yargs": "1.3.3"
"yargs": "3.10.0"
},
"peerDependencies": {
"yo": ">=1.0.0",
"generator-sublime": ">=1.7.7"
"generator-sublime": ">=1.7.8"
}
}
6 changes: 5 additions & 1 deletion service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ var ServiceGenerator = Class.extend({
},

writing: function() {
if(!_.contains(this.clientModules, this.modulename)) {
this.log(this.utils.chalk.red('Error: ') + 'The module name ' + this.utils.chalk.yellow(this.modulename) + ' does not exist');
return;
}
var done = this.async();
this.sourceRoot(path.join(__dirname, '../templates/service'));
var targetDir = path.join(this.clientFolder, 'scripts', this.moduleFolder, 'services');
Expand All @@ -161,4 +165,4 @@ var ServiceGenerator = Class.extend({
}
});

module.exports = ServiceGenerator;
module.exports = ServiceGenerator;
20 changes: 5 additions & 15 deletions templates/app/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,13 @@
"tests"
],
"dependencies": {
"angular": "1.3.15",
"angular-mocks": "1.3.15",
"angular-animate": "1.3.15",
"angular-sanitize": "1.3.15",
"angular-resource": "1.3.15",
"angular-ui-router": "0.2.13"<% if (ionic) { %>,
"marked":"0.3.3"<% if (ionic) { %>,
"ionic":"1.0.0"<% } %><% if (famous) { %>,
"famous-angular": "0.5.0"<% } %><% if (ngCordova) { %>,
"ngCordova": "0.1.15-alpha"<% } %><% if (fontawesome) { %>,
"font-awesome": "4.2.0"<% } %><% if (bootstrap) { %>,
"angular-bootstrap": "0.12.0",
"bootstrap": "3.3.1"<% } %><% if (material) { %>,
"angular-material": "0.8.3"<% } %>
"famous-angular": "0.5.0"<% } %><% if (fontawesome) { %>,
"font-awesome": "4.3.0"<% } %><% if (bootstrap) { %>,
"bootstrap": "3.3.4"<% } %><% if (material) { %>,
"angular-material": "0.9.8-rc1"<% } %>
},
"resolutions": {
"angular": "1.3.15",
"angular-animate": "1.3.15",
"angular-sanitize": "1.3.15"
}
}
62 changes: 12 additions & 50 deletions templates/app/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@
"test": "gulp test",
"postinstall": "bower install && node ./bin/protractor-fix-version.js"
},
"dependencies": {<% if (famous) { %>
"dependencies": {
"angular": "^1.3.16",
"angular-animate": "^1.3.16",
"angular-mocks": "^1.3.16",
"angular-resource": "^1.3.16",
"angular-sanitize": "^1.3.16",
"angular-ui-router": "^0.2.15"<% if (famous) { %>,
"famous": "^0.3.5",
"famous-polyfills": "^0.3.0"<% } %>
"famous-polyfills": "^0.3.0"<% } %><% if(ngCordova) { %>,
"ng-cordova": "^0.1.17-alpha"<% } %><% if(bootstrap) { %>,
"angular-bootstrap": "^0.12.0"<% } %>
},
"devDependencies": {
},
Expand All @@ -16,19 +24,10 @@
},
"browser": {
"unitHelper": "./test/unit/unitHelper.js",
"angular": "./bower_components/angular/angular.js",
"angular-mocks": "./bower_components/angular-mocks/angular-mocks.js",
"angular-ui-router": "./bower_components/angular-ui-router/release/angular-ui-router.js",
"angular-animate": "./bower_components/angular-animate/angular-animate.js",
"angular-resource": "./bower_components/angular-resource/angular-resource.js",
"lbServices": "./client/scripts/lbServices.js",
"angular-sanitize": "./bower_components/angular-sanitize/angular-sanitize.js"<% if(ionic) { %>,
"lbServices": "./client/scripts/lbServices.js"<% if (ionic) { %>,
"ionic": "./bower_components/ionic/release/js/ionic.js",
"angular-ionic": "./bower_components/ionic/release/js/ionic-angular.js"<% } %><% if(famous) { %>,
"famous-angular": "./bower_components/famous-angular/dist/famous-angular.js"<% } %><% if(ngCordova) { %>,
"ngCordova": "./bower_components/ngCordova/dist/ng-cordova.js",
"ngCordovaMocks": "./bower_components/ngCordova/dist/ng-cordova-mocks.js"<% } %><% if(bootstrap) { %>,
"angular-bootstrap": "./bower_components/angular-bootstrap/ui-bootstrap-tpls.js"<% } %><% if(material) { %>,
"famous-angular": "./bower_components/famous-angular/dist/famous-angular.js"<% } %><% if(material) { %>,
"angular-material": "./bower_components/angular-material/angular-material.js",
"angular-aria": "./bower_components/angular-aria/angular-aria.js"<% } %>
},
Expand All @@ -43,29 +42,10 @@
]
},
"browserify-shim": {
"angular": {
"exports": "angular"
},
"angular-mocks": {
"exports": "angular",
"depends": [
"angular"
]
},
"angular-resource": {
"depends": [
"angular"
]
},
"lbServices": {
"depends": [
"angular-resource"
]
},
"angular-ui-router": {
"depends": [
"angular"
]
}<% if(ionic) { %>,
"angular-ionic": {
"exports": "ionic",
Expand All @@ -86,24 +66,6 @@
"angular-sanitize",
"angular-ui-router"
]
}<% } %><% if(ngCordova) { %>,
"ngCordova": {
"exports": "ngCordova",
"depends": [
"angular"
]
},
"ngCordovaMocks": {
"exports": "ngCordovaMocks",
"depends": [
"angular"
]
}<% } %><% if(bootstrap) { %>,
"angular-bootstrap": {
"depends": [
"angular"
],
"exports": "angular.module('ui.bootstrap').name"
}<% } %><% if(material) { %>,
"angular-material": {
"depends": [
Expand Down
2 changes: 1 addition & 1 deletion templates/app/test/_jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"maxparams": 15,
"newcap": true,
"node": true,
"noempty": true,
"noempty": false,
"nonstandard": true,
"quotmark": "single",
"sub": true,
Expand Down
3 changes: 2 additions & 1 deletion templates/constant/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
/*eslint consistent-this:[0] */
var angular = require('angular-mocks');
var angular = require('angular');
require('angular-mocks');
var app = require('../')('app');
var constantname = '<%= constantname %>';
describe(app.name, function() {
Expand Down
3 changes: 2 additions & 1 deletion templates/controller/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
/*eslint consistent-this:[0] */
var angular = require('angular-mocks');
var angular = require('angular');
require('angular-mocks');
var app = require('../')('app');
var controllername = '<%= controllername %>';
describe(app.name, function() {
Expand Down
3 changes: 2 additions & 1 deletion templates/directive/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
/*eslint consistent-this:[0] */
var angular = require('angular-mocks');
var angular = require('angular');
require('angular-mocks');
var app = require('../')('app');
var directivename = '<%= directivename %>';
var unitHelper = require('unitHelper');
Expand Down
3 changes: 2 additions & 1 deletion templates/filter/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
/*eslint consistent-this:[0] */
var angular = require('angular-mocks');
var angular = require('angular');
require('angular-mocks');
var app = require('../')('app');
var filtername = '<%= filtername %>';
describe(app.name, function() {
Expand Down
2 changes: 1 addition & 1 deletion templates/module/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require('angular-ui-router');<% if (ionic) { %>
require('angular-ionic');<% } %><% if (material) { %>
require('angular-material');<% } %><% if (famous) { %>
require('famous-angular');<% } %><% if (ngCordova) { %>
require('ngCordova');<% } %>
require('ng-cordova');<% } %>

var modulename = '<%= modulename %>';

Expand Down
Loading

0 comments on commit d8924e6

Please sign in to comment.