Skip to content

Commit 90a1618

Browse files
committed
changed to phantomJS
1 parent cf834fb commit 90a1618

File tree

11 files changed

+43090
-392
lines changed

11 files changed

+43090
-392
lines changed

app/index.js

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
'use strict';
2-
31
var util = require('util');
42
var path = require('path');
53
var yeoman = require('yeoman-generator');
6-
74
var AngularjsGenerator = module.exports = function AngularjsGenerator(args, options, config) {
5+
'use strict';
86

97
yeoman.generators.Base.apply(this, arguments);
108

119
this.on('end', function () {
12-
1310
this.installDependencies({ skipInstall: options['skip-install'] });
1411
});
1512

@@ -19,74 +16,75 @@ var AngularjsGenerator = module.exports = function AngularjsGenerator(args, opti
1916
util.inherits(AngularjsGenerator, yeoman.generators.Base);
2017

2118
AngularjsGenerator.prototype.askFor = function askFor() {
19+
'use strict';
2220

2321
var cb = this.async();
2422

2523
// have Yeoman greet the user.
2624
console.log(this.yeoman);
2725

2826
var prompts = [{
29-
3027
name: 'continue',
3128
message: 'This will create a new AngularJS application. Continue? (y/n)',
3229
default: false
33-
}];
30+
}];
3431

35-
this.prompt(prompts, function (props) {
36-
32+
this.prompt(prompts, function (props) {
3733
this.moduleName = 'app';
38-
this.continue = props.continue;
39-
40-
cb();
34+
this.continue = props.continue;
4135

36+
cb();
4237
}.bind(this));
4338
};
4439

4540
AngularjsGenerator.prototype.createDirectories = function createDirectories() {
41+
'use strict';
4642

4743
//app
48-
this.mkdir('app');
44+
this.mkdir('app');
4945
this.mkdir('app/img');
5046
this.mkdir('app/css');
5147
this.mkdir('app/js');
5248
this.mkdir('app/lib');
5349
this.mkdir('app/partials');
54-
5550
//test
5651
this.mkdir('test');
52+
this.mkdir('test/lib/angular');
5753
this.mkdir('test/e2e');
5854
this.mkdir('test/unit');
59-
60-
//config
61-
this.mkdir('config')
55+
// karma conf
56+
this.mkdir('conf');
6257
};
6358

6459
AngularjsGenerator.prototype.addFiles = function addFiles() {
60+
'use strict';
6561

6662
//root
6763
this.copy('Gruntfile.js', 'Gruntfile.js');
6864
this.template('_package.json', 'package.json');
6965
this.copy('aws-config.json', 'aws-config.json');
7066
this.copy('gitignore', '.gitignore');
71-
7267
//app
73-
this.template('_index.html', 'app/index.html');
68+
this.template('_index.html', 'app/index.html');
7469
this.template('_app.js', 'app/js/app.js');
7570
this.template('_services.js', 'app/js/services.js');
7671
this.template('_controllers.js', 'app/js/controllers.js');
7772
this.template('_filters.js', 'app/js/filters.js');
7873
this.template('_directives.js', 'app/js/directives.js');
7974
this.copy('view1.html', 'app/partials/view1.html');
8075
this.copy('app.css', 'app/css/app.css');
81-
this.copy('robots.txt', 'app/robots.txt');
76+
this.copy('robots.txt', 'app/robots.txt');
8277
this.copy('gitkeep', 'app/img/.gitkeep');
8378
this.copy('gitkeep', 'app/lib/.gitkeep');
84-
8579
//test
80+
this.copy('angular.js', 'test/lib/angular/angular.js');
81+
this.copy('angular-mocks.js', 'test/lib/angular/angular-mocks.js');
82+
this.copy('angular-scenario.js', 'test/lib/angular/angular-scenario.js');
83+
this.copy('version.json', 'test/lib/angular/version.json');
84+
this.copy('version.txt', 'test/lib/angular/version.txt');
8685
this.copy('gitkeep', 'test/unit/.gitkeep');
8786
this.copy('gitkeep', 'test/e2e/.gitkeep');
88-
89-
//config
90-
this.copy('karma.conf.js', 'config/karma.conf.js');
91-
this.copy('karma-e2e.conf.js', 'config/karma-e2e.conf.js');
87+
// karma conf
88+
this.copy('karma.conf.js', 'conf/karma.conf.js');
89+
this.copy('karma-e2e.conf.js', 'conf/karma-e2e.conf.js');
9290
};

app/templates/Gruntfile.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ module.exports = function (grunt) {
111111
/* karma test runner */
112112
karma: {
113113
unit: {
114-
configFile: 'config/karma.conf.js',
115-
singleRun: true
114+
configFile: 'conf/karma.conf.js'
116115
}
117116
},
118117

app/templates/_package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"name": "angularseed",
33
"version": "0.0.1",
4-
"devDependencies": {
4+
"devDependencies": {
55
"grunt": "~0.4.1",
6-
"karma": "~0.8.6",
6+
"grunt-karma": "~0.6.2",
7+
"karma-jasmine": "~0.1.3",
8+
"karma-ng-scenario": "~0.1.0",
79
"grunt-contrib-clean": "~0.4.1",
810
"grunt-usemin": "~0.1.12",
911
"grunt-contrib-htmlmin": "~0.1.3",
1012
"grunt-contrib-imagemin": "~0.1.4",
1113
"grunt-contrib-concat": "~0.3.0",
1214
"grunt-contrib-copy": "~0.4.1",
1315
"grunt-contrib-cssmin": "~0.6.1",
14-
"grunt-contrib-uglify": "~0.2.2",
15-
"grunt-rev": "~0.1.0",
16-
"grunt-karma": "~0.4.3",
17-
"grunt-aws": "~0.2.1"
16+
"grunt-contrib-uglify": "~0.2.2",
17+
"grunt-rev": "~0.1.0",
18+
"grunt-aws": "~0.2.1"
1819
}
1920
}

0 commit comments

Comments
 (0)