Skip to content

Commit f836543

Browse files
committed
Merge branch 'upstream/master' into babel6
# Conflicts: # test/npm-shrinkwrap.json
2 parents f00ff3c + 7773ccf commit f836543

38 files changed

+2225
-2294
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ cache:
1818

1919
matrix:
2020
fast_finish: true
21-
allow_failures:
22-
- node_js: stable
2321

2422
install:
2523
# Check the size of caches

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The community has written [recipes](recipes#recipes) for common use-cases that w
2323
- [Where to place third-party files?](recipes/managing-third-party-files.md)
2424
- [How shall I properly upgrade my current project with the last version of the generator?](recipes/upgrade-my-current-project.md)
2525
- [Use spritesheets](recipes/use-spritesheet.md)
26+
- [Multiple modules](recipes/multiple-modules.md)
2627

2728

2829
## Still got questions?

docs/recipes/add-fontawesome.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# How to add fontawesome?
22

33
## [#337](https://github.com/Swiip/generator-gulp-angular/issues/337)
4-
Awesome. It's all working now. The scss import looks like
4+
5+
First, you need install fontawesome through bower
6+
```bash
7+
bower install fontawesome
8+
```
9+
10+
Next, you need add to your scss file this lines (please, check the paths if you
11+
change location of generator main.scss file):
512

613
```scss
7-
$fa-font-path: "../../bower_components/fontawesome/fonts";
8-
@import "../../bower_components/fontawesome/scss/font-awesome.scss";
14+
$fa-font-path: "../../bower_components/font-awesome/fonts";
15+
@import "../../bower_components/font-awesome/scss/font-awesome.scss";
916
```
1017

11-
Add a step to the `html` pipeline in `gulp/build.js`:
18+
Finally, you need add this pipeline in `gulp/build.js`, in `html` task:
1219

1320
```js
14-
.pipe($.replace('../../bower_components/fontawesome/fonts', '../fonts'))
21+
.pipe($.replace('../../bower_components/font-awesome/fonts', '../fonts'))
1522
```

docs/recipes/multiple-modules.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Use spritesheets
2+
3+
## [#737](https://github.com/Swiip/generator-gulp-angular/issues/737)
4+
5+
As your app becomes bigger, you might like to extract some parts of it into separate sub-modules.
6+
In order to accomplish that you need to:
7+
8+
Define a module (i.e. `app/splash/`):
9+
10+
```js
11+
import SplashController from './splash.controller';
12+
import router from './splash.routes';
13+
14+
export default angular.module('client.splash', [
15+
'ngAnimate',
16+
'ngTouch',
17+
'ngSanitize',
18+
'ui.router',
19+
])
20+
.config(router)
21+
.controller('SplashController', SplashController)
22+
;
23+
```
24+
25+
Then import it for use in your primary module (`index.module.js`):
26+
27+
```js
28+
import constants from './components/constants/env.constant';
29+
import indexConfig from './index.config';
30+
import routerConfig from './index.route';
31+
import runBlock from './index.run';
32+
33+
// Modules
34+
import './splash';
35+
// ... etc
36+
37+
angular.module('client', [
38+
'ngAnimate',
39+
'ngTouch',
40+
'ngSanitize',
41+
'ui.router',
42+
'angularMoment',
43+
'client.splash',
44+
// .... etc
45+
])
46+
.config(indexConfig)
47+
.constant('ENV', constants.ENV)
48+
.config(routerConfig)
49+
.run(runBlock)
50+
;
51+
```
52+

generators/app/files.json

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

2323
"package.json",
2424
"bower.json",
25-
"tsd.json",
25+
"typings.json",
2626

2727
"karma.conf.js",
2828

generators/app/prompts.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"message": "Which version of Angular do you want?",
66
"choices": [
77
{
8-
"value": "~1.4.8",
9-
"name": "1.4.x (stable)"
8+
"value": "~1.5.3",
9+
"name": "1.5.x (stable)"
1010
},
1111
{
12-
"value": "~1.3.20",
13-
"name": "1.3.x (legacy)"
12+
"value": "~1.2.29",
13+
"name": "1.2.x (legacy)"
1414
}
1515
]
1616
},

generators/app/src/mock-prompts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ model.htmlPreprocessor.choices.forEach(function (choice) {
8484
module.exports = {
8585
prompts: model,
8686
defaults: {
87-
angularVersion: model.angularVersion.values['1.4'],
87+
angularVersion: model.angularVersion.values['1.5'],
8888
angularModules: _.pluck(model.angularModules.choices, 'value'),
8989
jQuery: model.jQuery.values.jquery2,
9090
resource: model.resource.values['angular-resource'],

generators/app/src/preprocessors.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ module.exports = function (GulpAngularGenerator) {
6060
}
6161

6262
if (this.props.jsPreprocessor.key !== 'typescript') {
63-
rejectWithRegexp.call(this, /tsd\.json/);
63+
rejectWithRegexp.call(this, /typings\.json/);
6464
rejectWithRegexp.call(this, /tsconfig\.json/);
6565
}
6666

@@ -98,22 +98,4 @@ module.exports = function (GulpAngularGenerator) {
9898
}
9999
};
100100

101-
/**
102-
* Copy additional files for Travis
103-
*/
104-
GulpAngularGenerator.prototype.travisCopies = function travisCopies() {
105-
if (process.env.TRAVIS === 'true') {
106-
107-
// Avoid rate limit by GithubAPI
108-
if (this.props.jsPreprocessor.key === 'typescript') {
109-
110-
this.files.push({
111-
src: '.tsdrc',
112-
dest: '.tsdrc',
113-
template: false
114-
});
115-
}
116-
}
117-
};
118-
119101
};

generators/app/src/write.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = function (GulpAngularGenerator) {
4343
});
4444

4545
if (this.props.jsPreprocessor.key === 'typescript') {
46-
this.spawnCommandSync('tsd', ['install', '-so']);
46+
this.spawnCommandSync('typings', ['install', '-so']);
4747
}
4848
};
4949

generators/app/templates/.tsdrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

generators/app/templates/_bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"bootstrap": "~3.3.5",
4242
<% } -%>
4343
<% } if(props.ui.key === 'foundation') { -%>
44-
"foundation": "~5.5.2",
44+
"foundation-sites": "^6.1.2",
4545
<% } if(props.ui.key === 'angular-material') { -%>
46-
"angular-material": "~0.11.2",
46+
"angular-material": "~1.0.0",
4747
"material-design-iconfont": "~0.0.2",
4848
<% } if(props.ui.key === 'material-design-lite') { -%>
4949
"material-design-lite": "~1.0.4",

generators/app/templates/_karma.conf.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module.exports = function(config) {
7474
logLevel: 'WARN',
7575

7676
<% if (props.jsPreprocessor.key === 'noJsPrepro' || props.jsPreprocessor.key === 'coffee') { -%>
77-
frameworks: ['jasmine', 'angular-filesort'],
77+
frameworks: ['phantomjs-shim', 'jasmine', 'angular-filesort'],
7878

7979
angularFilesort: {
8080
<% if (props.jsPreprocessor.key === 'noJsPrepro') { -%>
@@ -84,7 +84,7 @@ module.exports = function(config) {
8484
<% } -%>
8585
},
8686
<% } else { -%>
87-
frameworks: ['jasmine'],
87+
frameworks: ['phantomjs-shim', 'jasmine'],
8888
<% } -%>
8989

9090
<% if(props.jsPreprocessor.key === 'traceur') { -%>
@@ -100,6 +100,7 @@ module.exports = function(config) {
100100
<% } if (props.jsPreprocessor.key === 'noJsPrepro' || props.jsPreprocessor.key === 'coffee') { -%>
101101
'karma-angular-filesort',
102102
<% } -%>
103+
'karma-phantomjs-shim',
103104
'karma-coverage',
104105
'karma-jasmine',
105106
'karma-ng-html2js-preprocessor'

generators/app/templates/_package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"gulp-angular-templatecache": "~1.8.0",
1313
"del": "~2.0.2",
1414
"lodash": "~3.10.1",
15-
"gulp-minify-css": "~1.2.1",
15+
"gulp-cssnano": "~2.1.1",
1616
"gulp-filter": "~3.0.1",
1717
"gulp-flatten": "~0.2.0",
1818
<% if (imageMin) { -%>
@@ -32,9 +32,9 @@
3232
"gulp-rename": "~1.2.2",
3333
"gulp-rev": "~6.0.1",
3434
"gulp-rev-replace": "~0.4.2",
35-
"gulp-minify-html": "~1.0.4",
35+
"gulp-htmlmin": "~1.3.0",
3636
"gulp-inject": "~3.0.0",
37-
"gulp-protractor": "~1.0.0",
37+
"gulp-protractor": "~2.1.0",
3838
"gulp-sourcemaps": "~1.6.0",
3939
<% if (props.cssPreprocessor.key === 'node-sass') { -%>
4040
"gulp-sass": "~2.0.4",
@@ -60,9 +60,9 @@
6060
"traceur-loader": "~0.6.3",
6161
<% } if (props.jsPreprocessor.key === 'typescript') { -%>
6262
"typescript": "~1.6.2",
63-
"awesome-typescript-loader": "~0.14.0",
63+
"ts-loader": "~0.8.0",
6464
"tslint-loader": "~1.0.2",
65-
"tsd": "~0.6.5",
65+
"typings": "~0.7.9",
6666
<% } else if (props.jsPreprocessor.srcExtension !== 'es6') { -%>
6767
"gulp-angular-filesort": "~1.1.1",
6868
<% } if (props.htmlPreprocessor.key !== 'noHtmlPrepro') { -%>
@@ -86,6 +86,7 @@
8686
<% } if (props.jsPreprocessor.srcExtension === 'js' || props.jsPreprocessor.srcExtension === 'coffee') { -%>
8787
"karma-angular-filesort": "~1.0.0",
8888
<% } -%>
89+
"karma-phantomjs-shim": "~1.2.0",
8990
"karma-coverage": "~0.5.2",
9091
"karma-ng-html2js-preprocessor": "~0.2.0",
9192
"browser-sync": "~2.9.11",

generators/app/templates/_tsd.json

Lines changed: 0 additions & 80 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "<%- appName %>",
3+
"version": false,
4+
"ambientDependencies": {
5+
<% if (angularModulesObject.animate) { -%>
6+
"angular-animate": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-animate.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
7+
<% } if (angularModulesObject.cookies) { -%>
8+
"angular-cookies": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-cookies.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
9+
<% } if (angularModulesObject.sanitize) { -%>
10+
"angular-sanitize": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-sanitize.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
11+
<% } -%>
12+
"jquery": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
13+
<% if (props.jQuery.key === 'zepto') { -%>
14+
"zepto": "github:DefinitelyTyped/DefinitelyTyped/zepto/zepto.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
15+
<% } if (props.resource.key === 'angular-resource') { -%>
16+
"angular-resource": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-resource.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
17+
<% } if (props.resource.key === 'restangular') { -%>
18+
"restangular": "github:DefinitelyTyped/DefinitelyTyped/restangular/restangular.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
19+
<% } if (props.router.key === 'ui-router') { -%>
20+
"angular-ui-router": "github:DefinitelyTyped/DefinitelyTyped/angular-ui-router/angular-ui-router.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
21+
<% } if (props.router.key === 'angular-route') { -%>
22+
"angular-route": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-route.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
23+
<% } if(props.ui.key === 'bootstrap' && props.bootstrapComponents === 'official') { -%>
24+
"bootstrap": "github:DefinitelyTyped/DefinitelyTyped/bootstrap/bootstrap.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
25+
<% } if(props.ui.key === 'foundation' && props.foundationComponents === 'official') { -%>
26+
"foundation": "github:DefinitelyTyped/DefinitelyTyped/foundation/foundation.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
27+
<% } if(props.ui.key === 'angular-material') { -%>
28+
"angular-material": "github:DefinitelyTyped/DefinitelyTyped/angular-material/angular-material.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
29+
<% } if(props.bootstrapComponents.key === 'ui-bootstrap') { -%>
30+
"ui-bootstrap": "github:DefinitelyTyped/DefinitelyTyped/angular-ui-bootstrap/angular-ui-bootstrap.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
31+
<% } -%>
32+
"angular-mocks": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-mocks.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
33+
"angular": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
34+
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
35+
"karma-jasmine": "github:DefinitelyTyped/DefinitelyTyped/karma-jasmine/karma-jasmine.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
36+
"moment-node": "github:DefinitelyTyped/DefinitelyTyped/moment/moment-node.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2",
37+
"moment": "github:DefinitelyTyped/DefinitelyTyped/moment/moment.d.ts#bb051830df88f5a55dcf06b7fe85bf6b62cc97f2"
38+
}
39+
}

generators/app/templates/gulp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Compile your markups files (when you use a HTML preprocessor).
3535

3636
## scripts.js
3737

38-
Compile your scripts with your JS preprocessor if you have one. Run the linter. If you use ES6, will also use Browserify to bundle the files.
38+
Compile your scripts with your JS preprocessor if you have one. Run the linter. If you use ES6 or Typescript, will also use Webpack to bundle the files.
3939

4040
## server.js
4141

0 commit comments

Comments
 (0)