Skip to content

Commit 1bbe85d

Browse files
authored
Merge pull request #2730 from angular-fullstack/rc3
More RC.3 changes
2 parents 74857d2 + b1f768e commit 1bbe85d

Some content is hidden

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

69 files changed

+147
-200
lines changed

Diff for: Gruntfile.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
var shell = require('shelljs');
42
var child_process = require('child_process');
53
var Q = require('q');

Diff for: gulpfile.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
const fs = require('fs');
32
const path = require('path');
43
const exec = require('child_process').exec;

Diff for: mocha.conf.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
global.DEBUG = !!process.env.DEBUG;
42

53
var fs = require('fs');

Diff for: src/generators/component/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import {Base} from 'yeoman-generator';
32

43
class Generator extends Base {

Diff for: src/generators/controller/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/decorator/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/directive/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/endpoint/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import path from 'path';
42
import { NamedBase } from '../generator-base';
53

Diff for: src/generators/factory/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/filter/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/generator-base.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import path from 'path';
42
import _ from 'lodash';
53
import s from 'underscore.string';

Diff for: src/generators/heroku/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import util from 'util';
32
import yeoman from 'yeoman-generator';
43
import {Base} from 'yeoman-generator';

Diff for: src/generators/insight-init.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var Insight = require('insight');
32
var pkg = require('../package.json');
43

Diff for: src/generators/openshift/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var util = require('util');
32
var yeoman = require('yeoman-generator');
43
var childProcess = require('child_process');

Diff for: src/generators/provider/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/service/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
var yeoman = require('yeoman-generator');
32

43
var Generator = yeoman.Base.extend({

Diff for: src/generators/util.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import path from 'path';
42
import fs from 'fs';
53
import glob from 'glob';

Diff for: src/test/endpoint.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import path from 'path';
32
import fs from 'fs';
43
import Promise from 'bluebird';

Diff for: src/test/main.test.js

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import path from 'path';
32
import fs from 'fs';
43
import _ from 'lodash';
@@ -15,7 +14,6 @@ import {
1514
} from './test-helpers';
1615

1716
const defaultOptions = {
18-
buildtool: 'gulp',
1917
transpiler: 'babel',
2018
flow: true,
2119
markup: 'html',
@@ -134,12 +132,12 @@ describe('angular-fullstack:app', function() {
134132
if(!process.env.SKIP_E2E) {
135133
it.skip('should run e2e tests successfully', function() {
136134
this.retries(2);
137-
return runCmd('gulp test:e2e').should.be.fulfilled();
135+
return runCmd('npm run test:e2e').should.be.fulfilled();
138136
});
139137

140138
it.skip('should run e2e tests successfully for production app', function() {
141139
this.retries(2);
142-
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
140+
return runCmd('npm run test:e2e:prod').should.be.fulfilled();
143141
});
144142
}
145143
});
@@ -190,7 +188,6 @@ describe('angular-fullstack:app', function() {
190188
var clientTestResult;
191189
var serverTestResult;
192190
var testOptions = {
193-
buildtool: 'gulp',
194191
transpiler: 'ts',
195192
markup: 'html',
196193
stylesheet: 'less',
@@ -246,12 +243,12 @@ describe('angular-fullstack:app', function() {
246243
if(!process.env.SKIP_E2E) {
247244
it.skip('should run e2e tests successfully', function() {
248245
this.retries(2);
249-
return runCmd('gulp test:e2e').should.be.fulfilled();
246+
return runCmd('npm run test:e2e').should.be.fulfilled();
250247
});
251248

252249
it.skip('should run e2e tests successfully for production app', function() {
253250
this.retries(2);
254-
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
251+
return runCmd('npm run test:e2e:prod').should.be.fulfilled();
255252
});
256253
}
257254
});
@@ -262,7 +259,6 @@ describe('angular-fullstack:app', function() {
262259
var clientTestResult;
263260
var serverTestResult;
264261
var testOptions = {
265-
buildtool: 'gulp',
266262
transpiler: 'babel',
267263
flow: true,
268264
markup: 'pug',
@@ -319,12 +315,12 @@ describe('angular-fullstack:app', function() {
319315
if(!process.env.SKIP_E2E) {
320316
it.skip('should run e2e tests successfully', function() {
321317
this.retries(2);
322-
return runCmd('gulp test:e2e').should.be.fulfilled();
318+
return runCmd('npm run test:e2e').should.be.fulfilled();
323319
});
324320

325321
it.skip('should run e2e tests successfully for production app', function() {
326322
this.retries(2);
327-
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
323+
return runCmd('npm run test:e2e:prod').should.be.fulfilled();
328324
});
329325
}
330326
});
@@ -335,7 +331,6 @@ describe('angular-fullstack:app', function() {
335331
var clientTestResult;
336332
var serverTestResult;
337333
var testOptions = {
338-
buildtool: 'gulp',
339334
transpiler: 'ts',
340335
markup: 'pug',
341336
stylesheet: 'stylus',
@@ -392,12 +387,12 @@ describe('angular-fullstack:app', function() {
392387
if(!process.env.SKIP_E2E) {
393388
it.skip('should run e2e tests successfully', function() {
394389
this.retries(2);
395-
return runCmd('gulp test:e2e').should.be.fulfilled();
390+
return runCmd('npm run test:e2e').should.be.fulfilled();
396391
});
397392

398393
it.skip('should run e2e tests successfully for production app', function() {
399394
this.retries(2);
400-
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
395+
return runCmd('npm run test:e2e:prod').should.be.fulfilled();
401396
});
402397
}
403398
});

Diff for: src/test/pre.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import path from 'path';
32
import assert from 'yeoman-assert';
43

Diff for: src/test/test-helpers.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import path from 'path';
32
import fs from 'fs';
43
import _ from 'lodash';

Diff for: task-utils/grunt.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
var path = require('path');
42
var fs = require('fs');
53
var Q = require('q');

Diff for: templates/app/_.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"presets": [
33
["babel-preset-env", {
44
"targets": {
5-
"node": "6.2"
5+
"node": "8.11.3"
66
}
77
}]
88
],

Diff for: templates/app/_package.json

+16-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"compression": "^1.7.1",
77
"core-js": "^2.5.0",
88
"express": "^4.13.3",
9+
"express-static-gzip": "~0.3.2",
910
"morgan": "^1.9.0",
1011
"body-parser": "^1.13.3",
1112
"method-override": "^2.3.10",
@@ -29,7 +30,7 @@
2930
"babel-runtime": "^6.18.0",<% if(filters.pug) { %>
3031
"pug": "^2.0.0",<% } %><% if(filters.html) { %>
3132
"ejs": "^2.5.3",<% } %><% if(filters.mongoose) { %>
32-
"mongoose": "^4.13.14",
33+
"mongoose": "^5.1.5",
3334
"bluebird": "^3.3.3",
3435
"connect-mongo": "^2.0.1",<% } %><% if(filters.sequelize) { %>
3536
"sequelize": "^3.23.6",
@@ -147,16 +148,20 @@
147148
"run-sequence": "^2.1.0",
148149
"lazypipe": "^1.0.1",
149150
<%# WEBPACK %>
151+
"compression-webpack-plugin": "^1.1.11",
150152
"webpack": "^4.12.0",
151153
"webpack-cli": "^3.0.6",
152154
"webpack-dev-server": "^3.1.4",
153155
"extract-text-webpack-plugin": "4.0.0-beta.0",
154156
"html-webpack-plugin": "^3.2.0",
155157
"html-webpack-harddisk-plugin": "~0.2.0",
158+
"mini-css-extract-plugin": "~0.4.0",
159+
"optimize-css-assets-webpack-plugin": "^4.0.2",
160+
"uglifyjs-webpack-plugin": "^1.2.5",
156161
<%_ if(filters.pug) { _%>
157162
"pug-html-loader": "^1.1.5",<% } %>
158163
"typescript": "~2.9.0",
159-
"awesome-typescript-loader": "^4.0.0",
164+
"awesome-typescript-loader": "^5.0.0",
160165
"babel-loader": "^7.1.2",
161166
"css-loader": "^0.28.7",
162167
"file-loader": "^0.11.2",
@@ -212,6 +217,8 @@
212217
"npm": ">=3.9.5"
213218
},
214219
"scripts": {
220+
"build": "gulp build",
221+
"build:server": "babel server -d dist/server --ignore spec.js,test.js,integration.js,local.env --source-maps",
215222
"postinstall": "gulp copy:fonts:dev",
216223
"lint": "npm run lint:client && npm run lint:server",
217224
"lint:client": <% if(filters.babel) { _%>"eslint ./client/**/*.<%= scriptExt %> -c ./client/.eslintrc --ignore-pattern *.spec.<%= scriptExt %>"<%_ } else { _%>
@@ -234,5 +241,12 @@
234241
"start:client": "webpack-dev-server --config webpack.dev.js",
235242
"start:server": "node server"
236243
},
244+
"sideEffects": [
245+
"*.css",
246+
"*.less",
247+
"*.sass",
248+
"*.scss",
249+
"*.styl"
250+
],
237251
"private": true
238252
}

Diff for: templates/app/client/app/main/main.component.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import {
32
async,
43
ComponentFixture,

Diff for: templates/app/client/components/auth(auth)/auth.module.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import { NgModule } from '@angular/core';
42
import { AuthService } from './auth.service';
53
import { UserService } from './user.service';

Diff for: templates/app/client/components/oauth-buttons(oauth)/oauth-buttons.component.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import { ComponentFixture, TestBed } from '@angular/core/testing';
32
import { By } from '@angular/platform-browser';
43
import { DebugElement } from '@angular/core';

Diff for: templates/app/client/components/socket(ws)/socket.mock.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
export class SocketServiceStub {
42
syncUpdates() {}
53
unsyncUpdates() {}

Diff for: templates/app/client/components/socket(ws)/socket.service.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import Primus from 'primus';
32
import primusEmit from 'primus-emit';
43
import { Injectable } from '@angular/core';

Diff for: templates/app/gulpfile.babel.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= rootGeneratorName() %> <%= rootGeneratorVersion() %>
2-
'use strict';
3-
42
import _ from 'lodash';
53
import del from 'del';
64
import gulp from 'gulp';

Diff for: templates/app/mocha.conf.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
// Register the Babel require hook
42
require('babel-core/register');
53

Diff for: templates/app/protractor.conf.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Protractor configuration
22
// https://github.com/angular/protractor/blob/master/referenceConf.js
33

4-
'use strict';
54
require('babel-register');
65

76
var config = {
@@ -90,7 +89,7 @@ var config = {
9089

9190
// Setup mongo for tests
9291
var mongoose = require('mongoose');
93-
mongoose.connect(serverConfig.mongo.uri, serverConfig.mongo.options); // Connect to database<% } %>
92+
return mongoose.connect(serverConfig.mongo.uri, serverConfig.mongo.options); // Connect to database<% } %>
9493
}
9594
};
9695

Diff for: templates/app/server/api/user(auth)/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import {Router} from 'express';
42
import * as controller from './user.controller';
53
import * as auth from '../../auth/auth.service';

Diff for: templates/app/server/api/user(auth)/index.spec.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/* globals sinon, describe, expect, it */
42

53
var proxyquire = require('proxyquire').noPreserveCache();

Diff for: templates/app/server/api/user(auth)/user.controller.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
<% if (filters.mongooseModels) { %>
32
import User from './user.model';<% } %><% if (filters.sequelizeModels) { %>
43
import {User} from '../../sqldb';<% } %>

Diff for: templates/app/server/api/user(auth)/user.events.js

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* User model events
33
*/
44

5-
'use strict';
6-
75
import {EventEmitter} from 'events';<% if (filters.sequelizeModels) { %>
86
import {User} from '../../sqldb';<% } %>
97
var UserEvents = new EventEmitter();

Diff for: templates/app/server/api/user(auth)/user.integration.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/* globals describe, expect, it, before, after, beforeEach, afterEach */
42

53
import app from '../..';<% if (filters.mongooseModels) { %>

Diff for: templates/app/server/api/user(auth)/user.model(mongooseModels).js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
/*eslint no-invalid-this:0*/
32
import crypto from 'crypto';
43
mongoose.Promise = require('bluebird');

Diff for: templates/app/server/api/user(auth)/user.model.spec(mongooseModels).js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import app from '../..';
42
import User from './user.model';
53
var user;

Diff for: templates/app/server/api/user(auth)/user.model.spec(sequelizeModels).js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import app from '../..';
32
import {User} from '../../sqldb';
43
var user;

Diff for: templates/app/server/app.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import seedDatabaseIfNeeded from './config/seed';<% } %>
1616

1717
<% if (filters.mongoose) { %>
1818
// Connect to MongoDB
19-
mongoose.connect(config.mongo.uri, config.mongo.options);
19+
const mongooseConnectionPromise = mongoose.connect(config.mongo.uri, config.mongo.options);
2020
mongoose.connection.on('error', function(err) {
2121
console.error('MongoDB connection error: ' + err);
2222
process.exit(-1); // eslint-disable-line no-process-exit
@@ -53,6 +53,7 @@ wsInitPromise
5353
.then(primus => {
5454
app.primus = primus;
5555
})<% if(filters.models) { %>
56+
.then(() => mongooseConnectionPromise)
5657
.then(seedDatabaseIfNeeded)<% } %>
5758
.then(startServer)
5859
.catch(err => {

0 commit comments

Comments
 (0)