Skip to content

Commit 66c31e8

Browse files
committed
Merge pull request #841 from zckrs/release-v1.0.0
Release v1.0.0
2 parents 0af2f55 + 23ae902 commit 66c31e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+10121
-26807
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
app/templates/
33
test/tmp/
4+
coverage/

.eslintrc

Lines changed: 125 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,130 @@
11
{
2-
"rules": {
3-
"strict": [2, "global"],
4-
"quotes": [2, "single"]
5-
},
2+
"extends": "eslint:recommended",
63
"env": {
74
"node": true
5+
},
6+
"rules": {
7+
"array-bracket-spacing": [
8+
2,
9+
"never"
10+
],
11+
"brace-style": [
12+
2,
13+
"1tbs"
14+
],
15+
"consistent-return": 0,
16+
"indent": [
17+
2,
18+
2
19+
],
20+
"no-multiple-empty-lines": [
21+
2,
22+
{
23+
"max": 2
24+
}
25+
],
26+
"no-use-before-define": [
27+
2,
28+
"nofunc"
29+
],
30+
"one-var": [
31+
2,
32+
"never"
33+
],
34+
"quote-props": [
35+
2,
36+
"as-needed"
37+
],
38+
"quotes": [
39+
2,
40+
"single"
41+
],
42+
"space-after-keywords": [
43+
2,
44+
"always"
45+
],
46+
"space-before-function-paren": [
47+
2,
48+
{
49+
"anonymous": "always",
50+
"named": "never"
51+
}
52+
],
53+
"space-in-parens": [
54+
2,
55+
"never"
56+
],
57+
"strict": [
58+
2,
59+
"global"
60+
],
61+
"curly": [
62+
2,
63+
"all"
64+
],
65+
"eol-last": 2,
66+
"key-spacing": [
67+
2,
68+
{
69+
"beforeColon": false,
70+
"afterColon": true
71+
}
72+
],
73+
"no-eval": 2,
74+
"no-with": 2,
75+
"space-infix-ops": 2,
76+
"dot-notation": [
77+
2,
78+
{
79+
"allowKeywords": true
80+
}
81+
],
82+
"eqeqeq": 2,
83+
"no-alert": 2,
84+
"no-caller": 2,
85+
"no-empty-label": 2,
86+
"no-extend-native": 2,
87+
"no-extra-bind": 2,
88+
"no-implied-eval": 2,
89+
"no-iterator": 2,
90+
"no-label-var": 2,
91+
"no-labels": 2,
92+
"no-lone-blocks": 2,
93+
"no-loop-func": 2,
94+
"no-multi-spaces": 2,
95+
"no-multi-str": 2,
96+
"no-native-reassign": 2,
97+
"no-new": 2,
98+
"no-new-func": 2,
99+
"no-new-wrappers": 2,
100+
"no-octal-escape": 2,
101+
"no-proto": 2,
102+
"no-return-assign": 2,
103+
"no-script-url": 2,
104+
"no-sequences": 2,
105+
"no-unused-expressions": 2,
106+
"yoda": 2,
107+
"no-shadow": 2,
108+
"no-shadow-restricted-names": 2,
109+
"no-undef-init": 2,
110+
"camelcase": 2,
111+
"comma-spacing": 2,
112+
"new-cap": 2,
113+
"new-parens": 2,
114+
"no-array-constructor": 2,
115+
"no-extra-parens": 2,
116+
"no-new-object": 2,
117+
"no-spaced-func": 2,
118+
"no-trailing-spaces": 2,
119+
"no-underscore-dangle": 2,
120+
"semi": 2,
121+
"semi-spacing": [
122+
2,
123+
{
124+
"before": false,
125+
"after": true
126+
}
127+
],
128+
"space-return-throw-case": 2
8129
}
9130
}

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ matrix:
2424
install:
2525
# Check the size of caches
2626
- du -sh ./node_modules ./test/tmp/deps/node_modules || true
27-
# Disable the spinner, it looks bad on Travis
28-
- npm config set spin false
2927
- npm install -g npm@latest
3028
# Instal npm dependecies and ensure that npm cache is not stale
3129
- ./scripts/generator-install-dependencies.sh

app/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ var GulpAngularGenerator = yeoman.generators.Base.extend({
2121
this.version = pkg.version;
2222

2323
this.insight = new Insight({
24-
trackingCode: 'UA-66934495-1',
25-
pkg: pkg
24+
trackingCode: 'UA-66934495-2',
25+
pkg: pkg
2626
});
2727

2828
this.props = {};

app/src/bower.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var _ = require('lodash');
44

5-
module.exports = function(GulpAngularGenerator) {
5+
module.exports = function (GulpAngularGenerator) {
66

77
/**
88
* Prepare Bower overrides property to fix external bower.json with missing
@@ -60,7 +60,7 @@ module.exports = function(GulpAngularGenerator) {
6060

6161
if (this.props.router.key === 'new-router') {
6262
bowerOverrides['angular-new-router'] = {
63-
main: [ 'dist/router.es5.js' ]
63+
main: ['dist/router.es5.js']
6464
};
6565
}
6666

@@ -82,20 +82,20 @@ module.exports = function(GulpAngularGenerator) {
8282
this.wiredepExclusions.push('/jquery/');
8383
}
8484
if (this.props.ui.key === 'bootstrap') {
85-
if(this.props.bootstrapComponents.key !== 'official') {
85+
if (this.props.bootstrapComponents.key !== 'official') {
8686
this.wiredepExclusions.push('/\\\/bootstrap\\.js$/');
87-
if(this.props.cssPreprocessor.extension === 'scss') {
87+
if (this.props.cssPreprocessor.extension === 'scss') {
8888
this.wiredepExclusions.push('/\\\/bootstrap-sass\\/.*\\.js/');
8989
}
9090
}
91-
if(this.props.cssPreprocessor.key !== 'noCssPrepro') {
91+
if (this.props.cssPreprocessor.key !== 'noCssPrepro') {
9292
this.wiredepExclusions.push('/\\\/bootstrap\\.css/');
9393
}
9494
} else if (this.props.ui.key === 'foundation') {
95-
if(this.props.foundationComponents.key !== 'official') {
95+
if (this.props.foundationComponents.key !== 'official') {
9696
this.wiredepExclusions.push('/foundation\\.js/');
9797
}
98-
if(this.props.cssPreprocessor.extension === 'scss') {
98+
if (this.props.cssPreprocessor.extension === 'scss') {
9999
this.wiredepExclusions.push('/foundation\\.css/');
100100
}
101101
}

app/src/files.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ var files = require('../files.json');
1010
* Look for the js preprocessor equivalent file and use it if exist
1111
*/
1212
function resolvePaths(template) {
13-
return function(file) {
14-
var src = file, dest = file;
13+
return function (file) {
14+
var src = file;
15+
var dest = file;
1516

16-
if(template) {
17+
if (template) {
1718
var basename = path.basename(file);
1819
src = file.replace(basename, '_' + basename);
1920
}
2021

21-
if(src.match(/\.js$/)) {
22+
if (src.match(/\.js$/)) {
2223
var preprocessorFile = this.sourceRoot() + '/' + src.replace(/\.js$/, '.' + this.props.jsPreprocessor.srcExtension);
23-
if(this.fs.exists(preprocessorFile)) {
24+
if (this.fs.exists(preprocessorFile)) {
2425
src = src.replace(/\.js$/, '.' + this.props.jsPreprocessor.srcExtension);
2526
dest = dest.replace(/\.js$/, '.' + this.props.jsPreprocessor.extension);
2627
}
@@ -34,7 +35,7 @@ function resolvePaths(template) {
3435
};
3536
}
3637

37-
module.exports = function(GulpAngularGenerator) {
38+
module.exports = function (GulpAngularGenerator) {
3839

3940
/**
4041
* Prepare all files from files.json and add them to `this.files` as

app/src/mock-options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var mockOptions = {
1313
defaults: {}
1414
};
1515

16-
options.forEach(function(option) {
16+
options.forEach(function (option) {
1717
mockOptions.defaults[option.name] = option.defaults;
1818
});
1919

app/src/mock-prompts.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,55 +29,55 @@ var questions = [
2929

3030
var model = {};
3131

32-
questions.forEach(function(question) {
32+
questions.forEach(function (question) {
3333
model[question] = {
3434
choices: _.findWhere(prompts, {name: question}).choices,
3535
values: {}
3636
};
3737
});
3838

39-
model.angularVersion.choices.forEach(function(choice) {
39+
model.angularVersion.choices.forEach(function (choice) {
4040
var title = choice.name.substring(0, 3);
4141
model.angularVersion.values[title] = choice.value;
4242
});
4343

44-
model.angularModules.choices.forEach(function(choice) {
44+
model.angularModules.choices.forEach(function (choice) {
4545
model.angularModules.values[choice.value.name] = choice.value;
4646
});
4747

48-
model.jQuery.choices.forEach(function(choice) {
48+
model.jQuery.choices.forEach(function (choice) {
4949
model.jQuery.values[choice.value.key] = choice.value;
5050
});
5151

52-
model.resource.choices.forEach(function(choice) {
52+
model.resource.choices.forEach(function (choice) {
5353
model.resource.values[choice.value.key] = choice.value;
5454
});
5555

56-
model.router.choices.forEach(function(choice) {
56+
model.router.choices.forEach(function (choice) {
5757
model.router.values[choice.value.key] = choice.value;
5858
});
5959

60-
model.ui.choices.forEach(function(choice) {
60+
model.ui.choices.forEach(function (choice) {
6161
model.ui.values[choice.value.key] = choice.value;
6262
});
6363

64-
model.bootstrapComponents.choices.forEach(function(choice) {
64+
model.bootstrapComponents.choices.forEach(function (choice) {
6565
model.bootstrapComponents.values[choice.value.key] = choice.value;
6666
});
6767

68-
model.foundationComponents.choices.forEach(function(choice) {
68+
model.foundationComponents.choices.forEach(function (choice) {
6969
model.foundationComponents.values[choice.value.key] = choice.value;
7070
});
7171

72-
model.cssPreprocessor.choices.forEach(function(choice) {
72+
model.cssPreprocessor.choices.forEach(function (choice) {
7373
model.cssPreprocessor.values[choice.value.key] = choice.value;
7474
});
7575

76-
model.jsPreprocessor.choices.forEach(function(choice) {
76+
model.jsPreprocessor.choices.forEach(function (choice) {
7777
model.jsPreprocessor.values[choice.value.key] = choice.value;
7878
});
7979

80-
model.htmlPreprocessor.choices.forEach(function(choice) {
80+
model.htmlPreprocessor.choices.forEach(function (choice) {
8181
model.htmlPreprocessor.values[choice.value.key] = choice.value;
8282
});
8383

@@ -86,7 +86,7 @@ module.exports = {
8686
defaults: {
8787
angularVersion: model.angularVersion.values['1.4'],
8888
angularModules: _.pluck(model.angularModules.choices, 'value'),
89-
jQuery: model.jQuery.values['jquery2'],
89+
jQuery: model.jQuery.values.jquery2,
9090
resource: model.resource.values['angular-resource'],
9191
router: model.router.values['ui-router'],
9292
ui: model.ui.values.bootstrap,

app/src/modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var _ = require('lodash');
44

5-
module.exports = function(GulpAngularGenerator) {
5+
module.exports = function (GulpAngularGenerator) {
66

77
/**
88
* Compute Angular's module to load and format the dependency list to insert

app/src/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ var s = require('underscore.string');
66

77
var options = require('../options.json');
88

9-
module.exports = function(GulpAngularGenerator) {
9+
module.exports = function (GulpAngularGenerator) {
1010

1111
/**
1212
* Declares options in the generator (only used for the help messages)
1313
*/
1414
GulpAngularGenerator.prototype.defineOptions = function defineOptions() {
15-
options.forEach(function(option) {
15+
options.forEach(function (option) {
1616
this.option(option.name, {
1717
type: global[option.type],
1818
required: option.required,

0 commit comments

Comments
 (0)