From 0674ad06e5409a61a5a3cd17892b860516fa4436 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Tue, 7 Jun 2016 06:56:38 +1000 Subject: [PATCH 001/104] docker integration part 1 --- src/generators/app/USAGE | 1 + src/generators/docker/USAGE | 8 ++++ src/generators/docker/index.js | 41 +++++++++++++++++++++ src/generators/docker/templates/_Dockerfile | 2 + templates/app/Gruntfile(grunt).js | 2 +- templates/app/gulpfile.babel(gulp).js | 2 +- 6 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 src/generators/docker/USAGE create mode 100644 src/generators/docker/index.js create mode 100644 src/generators/docker/templates/_Dockerfile diff --git a/src/generators/app/USAGE b/src/generators/app/USAGE index 22bfcb18d..b4467276f 100644 --- a/src/generators/app/USAGE +++ b/src/generators/app/USAGE @@ -22,3 +22,4 @@ Sub Generators: Deployment: angular-fullstack:openshift angular-fullstack:heroku + angular-fullstack:docker diff --git a/src/generators/docker/USAGE b/src/generators/docker/USAGE new file mode 100644 index 000000000..32eca24b1 --- /dev/null +++ b/src/generators/docker/USAGE @@ -0,0 +1,8 @@ +Description: + Add a Dockerfile to the dist folder. + +Example: + yo angular-fullstack:docker + + This will create: + a dist folder with a Dockerfile in it diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js new file mode 100644 index 000000000..0a20c6c2c --- /dev/null +++ b/src/generators/docker/index.js @@ -0,0 +1,41 @@ +'use strict'; +var util = require('util'); +var yeoman = require('yeoman-generator'); +var exec = require('child_process').exec; +var chalk = require('chalk'); +var path = require('path'); +var s = require('underscore.string'); + +var Generator = module.exports = function Generator() { + yeoman.generators.Base.apply(this, arguments); + this.sourceRoot(path.join(__dirname, './templates')); + this.filters = this.config.get('filters') || {}; +}; + +util.inherits(Generator, yeoman.generators.NamedBase); + +Generator.prototype.copyDockerfile = function copyDockerfile() { + if(this.abort) return; + var done = this.async(); + this.log(chalk.bold('Creating Dockerfile')); + //this.copy('Dockerfile', 'dist/Dockerfile'); + this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', {}); + this.conflicter.resolve(function (err) { + done(); + }); +}; + +Generator.prototype.gruntBuild = function gruntBuild() { + if(this.abort) return; + var done = this.async(); + + this.log(chalk.bold('\nBuilding dist folder, please wait...')); + var child = exec('grunt build', function (err, stdout) { + done(); + }.bind(this)); + child.stdout.on('data', function(data) { + this.log(data.toString()); + }.bind(this)); +}; + + diff --git a/src/generators/docker/templates/_Dockerfile b/src/generators/docker/templates/_Dockerfile new file mode 100644 index 000000000..152223532 --- /dev/null +++ b/src/generators/docker/templates/_Dockerfile @@ -0,0 +1,2 @@ +FROM generatorangularfullstack/angular-fullstack-dist:3.3.0 + diff --git a/templates/app/Gruntfile(grunt).js b/templates/app/Gruntfile(grunt).js index cf335b970..73001fc54 100644 --- a/templates/app/Gruntfile(grunt).js +++ b/templates/app/Gruntfile(grunt).js @@ -198,7 +198,7 @@ module.exports = function(grunt) { dot: true, src: [ '.tmp', - '<%%= yeoman.dist %>/!(.git*|.openshift|Procfile)**' + '<%%= yeoman.dist %>/!(.git*|.openshift|Procfile|Dockerfile)**' ] }] }, diff --git a/templates/app/gulpfile.babel(gulp).js b/templates/app/gulpfile.babel(gulp).js index 16582400f..897d02328 100644 --- a/templates/app/gulpfile.babel(gulp).js +++ b/templates/app/gulpfile.babel(gulp).js @@ -572,7 +572,7 @@ gulp.task('build', cb => { cb); }); -gulp.task('clean:dist', () => del([`${paths.dist}/!(.git*|.openshift|Procfile)**`], {dot: true})); +gulp.task('clean:dist', () => del([`${paths.dist}/!(.git*|.openshift|Procfile|Dockerfile)**`], {dot: true})); gulp.task('build:client', ['styles', 'html', 'constant', 'build:images'], () => { var manifest = gulp.src(`${paths.dist}/${clientPath}/assets/rev-manifest.json`); From d1ca75dd6bcee68db1b3bb3f5884b731425b20e4 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Tue, 7 Jun 2016 21:51:45 +1000 Subject: [PATCH 002/104] docker base image take 1 --- .gitmodules | 3 +++ ci/angular-fullstack-dockerfile | 1 + templates/app/typings(ts).json | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 160000 ci/angular-fullstack-dockerfile diff --git a/.gitmodules b/.gitmodules index ff287e31c..064b3b9f2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "angular-fullstack-deps"] path = angular-fullstack-deps url = git@github.com:angular-fullstack/angular-fullstack-deps.git +[submodule "ci/angular-fullstack-dockerfile"] + path = ci/angular-fullstack-dockerfile + url = git@github.com:angular-fullstack/angular-fullstack-dockerfile.git diff --git a/ci/angular-fullstack-dockerfile b/ci/angular-fullstack-dockerfile new file mode 160000 index 000000000..7423fb56a --- /dev/null +++ b/ci/angular-fullstack-dockerfile @@ -0,0 +1 @@ +Subproject commit 7423fb56a8a361ed0e55f9e0b80cc41ae914e49c diff --git a/templates/app/typings(ts).json b/templates/app/typings(ts).json index cfbd0f707..3a81d5e2e 100644 --- a/templates/app/typings(ts).json +++ b/templates/app/typings(ts).json @@ -13,8 +13,9 @@ "chai": "github:DefinitelyTyped/DefinitelyTyped/chai/chai.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", "assertion-error": "github:DefinitelyTyped/DefinitelyTyped/assertion-error/assertion-error.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", "sinon": "github:DefinitelyTyped/DefinitelyTyped/sinon/sinon.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", - "sinon-chai": "github:DefinitelyTyped/DefinitelyTyped/sinon-chai/sinon-chai.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe"<% } %> + "sinon-chai": "github:DefinitelyTyped/DefinitelyTyped/sinon-chai/sinon-chai.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe",<% } %> <%_ if(filters.jasmine) { _%> - "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe"<% } %> + "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe",<% } %> + "selenium-webdriver": "github:DefinitelyTyped/DefinitelyTyped/selenium-webdriver/selenium-webdriver.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe" } } From c7f4fa59d3d80a01201f50852ad8d962cbeab37c Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Thu, 9 Jun 2016 21:10:57 +1000 Subject: [PATCH 003/104] moved docker submodule fixed docker from version --- .gitmodules | 4 ++-- angular-fullstack-dockerfile | 1 + ci/angular-fullstack-dockerfile | 1 - src/generators/docker/index.js | 5 +---- src/generators/docker/templates/_Dockerfile | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) create mode 160000 angular-fullstack-dockerfile delete mode 160000 ci/angular-fullstack-dockerfile diff --git a/.gitmodules b/.gitmodules index 064b3b9f2..9b20da6e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "angular-fullstack-deps"] path = angular-fullstack-deps url = git@github.com:angular-fullstack/angular-fullstack-deps.git -[submodule "ci/angular-fullstack-dockerfile"] - path = ci/angular-fullstack-dockerfile +[submodule "angular-fullstack-dockerfile"] + path = angular-fullstack-dockerfile url = git@github.com:angular-fullstack/angular-fullstack-dockerfile.git diff --git a/angular-fullstack-dockerfile b/angular-fullstack-dockerfile new file mode 160000 index 000000000..299fe0004 --- /dev/null +++ b/angular-fullstack-dockerfile @@ -0,0 +1 @@ +Subproject commit 299fe0004ae72fbe0181729c7f82339f96c8574b diff --git a/ci/angular-fullstack-dockerfile b/ci/angular-fullstack-dockerfile deleted file mode 160000 index 7423fb56a..000000000 --- a/ci/angular-fullstack-dockerfile +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7423fb56a8a361ed0e55f9e0b80cc41ae914e49c diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 0a20c6c2c..7b38bddf7 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -15,18 +15,15 @@ var Generator = module.exports = function Generator() { util.inherits(Generator, yeoman.generators.NamedBase); Generator.prototype.copyDockerfile = function copyDockerfile() { - if(this.abort) return; var done = this.async(); this.log(chalk.bold('Creating Dockerfile')); - //this.copy('Dockerfile', 'dist/Dockerfile'); - this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', {}); + this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', this ); this.conflicter.resolve(function (err) { done(); }); }; Generator.prototype.gruntBuild = function gruntBuild() { - if(this.abort) return; var done = this.async(); this.log(chalk.bold('\nBuilding dist folder, please wait...')); diff --git a/src/generators/docker/templates/_Dockerfile b/src/generators/docker/templates/_Dockerfile index 152223532..89837b8e6 100644 --- a/src/generators/docker/templates/_Dockerfile +++ b/src/generators/docker/templates/_Dockerfile @@ -1,2 +1,2 @@ -FROM generatorangularfullstack/angular-fullstack-dist:3.3.0 +FROM generatorangularfullstack/angular-fullstack-dist:<%= rootGeneratorVersion() %> From 4fe344d6c7e02a3832e115fd4770b7cae290129f Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Tue, 7 Jun 2016 06:56:38 +1000 Subject: [PATCH 004/104] feat(gen:docker): initial docker subgenerator --- src/generators/app/USAGE | 1 + src/generators/docker/USAGE | 8 ++++ src/generators/docker/index.js | 41 +++++++++++++++++++++ src/generators/docker/templates/_Dockerfile | 2 + templates/app/Gruntfile(grunt).js | 2 +- templates/app/gulpfile.babel(gulp).js | 2 +- 6 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 src/generators/docker/USAGE create mode 100644 src/generators/docker/index.js create mode 100644 src/generators/docker/templates/_Dockerfile diff --git a/src/generators/app/USAGE b/src/generators/app/USAGE index 22bfcb18d..b4467276f 100644 --- a/src/generators/app/USAGE +++ b/src/generators/app/USAGE @@ -22,3 +22,4 @@ Sub Generators: Deployment: angular-fullstack:openshift angular-fullstack:heroku + angular-fullstack:docker diff --git a/src/generators/docker/USAGE b/src/generators/docker/USAGE new file mode 100644 index 000000000..32eca24b1 --- /dev/null +++ b/src/generators/docker/USAGE @@ -0,0 +1,8 @@ +Description: + Add a Dockerfile to the dist folder. + +Example: + yo angular-fullstack:docker + + This will create: + a dist folder with a Dockerfile in it diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js new file mode 100644 index 000000000..0a20c6c2c --- /dev/null +++ b/src/generators/docker/index.js @@ -0,0 +1,41 @@ +'use strict'; +var util = require('util'); +var yeoman = require('yeoman-generator'); +var exec = require('child_process').exec; +var chalk = require('chalk'); +var path = require('path'); +var s = require('underscore.string'); + +var Generator = module.exports = function Generator() { + yeoman.generators.Base.apply(this, arguments); + this.sourceRoot(path.join(__dirname, './templates')); + this.filters = this.config.get('filters') || {}; +}; + +util.inherits(Generator, yeoman.generators.NamedBase); + +Generator.prototype.copyDockerfile = function copyDockerfile() { + if(this.abort) return; + var done = this.async(); + this.log(chalk.bold('Creating Dockerfile')); + //this.copy('Dockerfile', 'dist/Dockerfile'); + this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', {}); + this.conflicter.resolve(function (err) { + done(); + }); +}; + +Generator.prototype.gruntBuild = function gruntBuild() { + if(this.abort) return; + var done = this.async(); + + this.log(chalk.bold('\nBuilding dist folder, please wait...')); + var child = exec('grunt build', function (err, stdout) { + done(); + }.bind(this)); + child.stdout.on('data', function(data) { + this.log(data.toString()); + }.bind(this)); +}; + + diff --git a/src/generators/docker/templates/_Dockerfile b/src/generators/docker/templates/_Dockerfile new file mode 100644 index 000000000..152223532 --- /dev/null +++ b/src/generators/docker/templates/_Dockerfile @@ -0,0 +1,2 @@ +FROM generatorangularfullstack/angular-fullstack-dist:3.3.0 + diff --git a/templates/app/Gruntfile(grunt).js b/templates/app/Gruntfile(grunt).js index cf335b970..73001fc54 100644 --- a/templates/app/Gruntfile(grunt).js +++ b/templates/app/Gruntfile(grunt).js @@ -198,7 +198,7 @@ module.exports = function(grunt) { dot: true, src: [ '.tmp', - '<%%= yeoman.dist %>/!(.git*|.openshift|Procfile)**' + '<%%= yeoman.dist %>/!(.git*|.openshift|Procfile|Dockerfile)**' ] }] }, diff --git a/templates/app/gulpfile.babel(gulp).js b/templates/app/gulpfile.babel(gulp).js index 16582400f..897d02328 100644 --- a/templates/app/gulpfile.babel(gulp).js +++ b/templates/app/gulpfile.babel(gulp).js @@ -572,7 +572,7 @@ gulp.task('build', cb => { cb); }); -gulp.task('clean:dist', () => del([`${paths.dist}/!(.git*|.openshift|Procfile)**`], {dot: true})); +gulp.task('clean:dist', () => del([`${paths.dist}/!(.git*|.openshift|Procfile|Dockerfile)**`], {dot: true})); gulp.task('build:client', ['styles', 'html', 'constant', 'build:images'], () => { var manifest = gulp.src(`${paths.dist}/${clientPath}/assets/rev-manifest.json`); From c4963fed1e3034d0038d0f018e1ee124230440a8 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Tue, 7 Jun 2016 21:51:45 +1000 Subject: [PATCH 005/104] feat(gen:docker): add docker base image --- .gitmodules | 3 +++ ci/angular-fullstack-dockerfile | 1 + templates/app/typings(ts).json | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 160000 ci/angular-fullstack-dockerfile diff --git a/.gitmodules b/.gitmodules index ff287e31c..064b3b9f2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "angular-fullstack-deps"] path = angular-fullstack-deps url = git@github.com:angular-fullstack/angular-fullstack-deps.git +[submodule "ci/angular-fullstack-dockerfile"] + path = ci/angular-fullstack-dockerfile + url = git@github.com:angular-fullstack/angular-fullstack-dockerfile.git diff --git a/ci/angular-fullstack-dockerfile b/ci/angular-fullstack-dockerfile new file mode 160000 index 000000000..7423fb56a --- /dev/null +++ b/ci/angular-fullstack-dockerfile @@ -0,0 +1 @@ +Subproject commit 7423fb56a8a361ed0e55f9e0b80cc41ae914e49c diff --git a/templates/app/typings(ts).json b/templates/app/typings(ts).json index cfbd0f707..3a81d5e2e 100644 --- a/templates/app/typings(ts).json +++ b/templates/app/typings(ts).json @@ -13,8 +13,9 @@ "chai": "github:DefinitelyTyped/DefinitelyTyped/chai/chai.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", "assertion-error": "github:DefinitelyTyped/DefinitelyTyped/assertion-error/assertion-error.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", "sinon": "github:DefinitelyTyped/DefinitelyTyped/sinon/sinon.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", - "sinon-chai": "github:DefinitelyTyped/DefinitelyTyped/sinon-chai/sinon-chai.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe"<% } %> + "sinon-chai": "github:DefinitelyTyped/DefinitelyTyped/sinon-chai/sinon-chai.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe",<% } %> <%_ if(filters.jasmine) { _%> - "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe"<% } %> + "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe",<% } %> + "selenium-webdriver": "github:DefinitelyTyped/DefinitelyTyped/selenium-webdriver/selenium-webdriver.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe" } } From b33bc7b1450fe7692b9f12cc71fecfedfd00dd30 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Thu, 9 Jun 2016 21:10:57 +1000 Subject: [PATCH 006/104] fix(gen:docker): move docker submodule, fixe docker FROM version --- .gitmodules | 4 ++-- angular-fullstack-dockerfile | 1 + ci/angular-fullstack-dockerfile | 1 - src/generators/docker/index.js | 5 +---- src/generators/docker/templates/_Dockerfile | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) create mode 160000 angular-fullstack-dockerfile delete mode 160000 ci/angular-fullstack-dockerfile diff --git a/.gitmodules b/.gitmodules index 064b3b9f2..9b20da6e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "angular-fullstack-deps"] path = angular-fullstack-deps url = git@github.com:angular-fullstack/angular-fullstack-deps.git -[submodule "ci/angular-fullstack-dockerfile"] - path = ci/angular-fullstack-dockerfile +[submodule "angular-fullstack-dockerfile"] + path = angular-fullstack-dockerfile url = git@github.com:angular-fullstack/angular-fullstack-dockerfile.git diff --git a/angular-fullstack-dockerfile b/angular-fullstack-dockerfile new file mode 160000 index 000000000..299fe0004 --- /dev/null +++ b/angular-fullstack-dockerfile @@ -0,0 +1 @@ +Subproject commit 299fe0004ae72fbe0181729c7f82339f96c8574b diff --git a/ci/angular-fullstack-dockerfile b/ci/angular-fullstack-dockerfile deleted file mode 160000 index 7423fb56a..000000000 --- a/ci/angular-fullstack-dockerfile +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7423fb56a8a361ed0e55f9e0b80cc41ae914e49c diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 0a20c6c2c..7b38bddf7 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -15,18 +15,15 @@ var Generator = module.exports = function Generator() { util.inherits(Generator, yeoman.generators.NamedBase); Generator.prototype.copyDockerfile = function copyDockerfile() { - if(this.abort) return; var done = this.async(); this.log(chalk.bold('Creating Dockerfile')); - //this.copy('Dockerfile', 'dist/Dockerfile'); - this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', {}); + this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', this ); this.conflicter.resolve(function (err) { done(); }); }; Generator.prototype.gruntBuild = function gruntBuild() { - if(this.abort) return; var done = this.async(); this.log(chalk.bold('\nBuilding dist folder, please wait...')); diff --git a/src/generators/docker/templates/_Dockerfile b/src/generators/docker/templates/_Dockerfile index 152223532..89837b8e6 100644 --- a/src/generators/docker/templates/_Dockerfile +++ b/src/generators/docker/templates/_Dockerfile @@ -1,2 +1,2 @@ -FROM generatorangularfullstack/angular-fullstack-dist:3.3.0 +FROM generatorangularfullstack/angular-fullstack-dist:<%= rootGeneratorVersion() %> From 4ff86088f5ad12281c0c2ba2b52352e06df2a629 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 14 Jun 2016 00:13:36 -0400 Subject: [PATCH 007/104] refactor(gen:docker): refactor gen code, move template to root templates folder --- src/generators/docker/index.js | 75 ++++++++++--------- .../docker}/_Dockerfile | 0 2 files changed, 40 insertions(+), 35 deletions(-) rename {src/generators/docker/templates => templates/docker}/_Dockerfile (100%) diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 7b38bddf7..18b5c3a61 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -1,38 +1,43 @@ 'use strict'; -var util = require('util'); -var yeoman = require('yeoman-generator'); -var exec = require('child_process').exec; -var chalk = require('chalk'); -var path = require('path'); -var s = require('underscore.string'); - -var Generator = module.exports = function Generator() { - yeoman.generators.Base.apply(this, arguments); - this.sourceRoot(path.join(__dirname, './templates')); - this.filters = this.config.get('filters') || {}; -}; - -util.inherits(Generator, yeoman.generators.NamedBase); - -Generator.prototype.copyDockerfile = function copyDockerfile() { - var done = this.async(); - this.log(chalk.bold('Creating Dockerfile')); - this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', this ); - this.conflicter.resolve(function (err) { - done(); - }); -}; - -Generator.prototype.gruntBuild = function gruntBuild() { - var done = this.async(); - - this.log(chalk.bold('\nBuilding dist folder, please wait...')); - var child = exec('grunt build', function (err, stdout) { - done(); - }.bind(this)); - child.stdout.on('data', function(data) { - this.log(data.toString()); - }.bind(this)); -}; +import {exec} from 'child_process'; +import chalk from 'chalk'; +import path from 'path'; +import {Base} from 'yeoman-generator'; +import Promise from 'bluebird'; +class Generator extends Base { + constructor(...args) { + super(...args); + this.sourceRoot(path.join(__dirname, '../../templates/docker')); + } + + initializing() { + return genBase(this); + } + + copyDockerfile() { + var done = this.async(); + this.log(chalk.bold('Creating Dockerfile')); + this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', this); + this.conflicter.resolve(err => { + done(err); + }); + } + + gruntBuild() { + this.log(chalk.bold('\nBuilding dist folder, please wait...')); + + return new Promise((resolve, reject) => { + var child = exec('grunt build', (err, stdout) => { + if(err) return reject(err); + + resolve(); + }); + + child.stdout.on('data', data => { + this.log(data.toString()); + }); + }); + } +} diff --git a/src/generators/docker/templates/_Dockerfile b/templates/docker/_Dockerfile similarity index 100% rename from src/generators/docker/templates/_Dockerfile rename to templates/docker/_Dockerfile From a124d26d163a16901c8ce1a6bd2e4ac990f0f4df Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 14 Jun 2016 13:23:04 -0400 Subject: [PATCH 008/104] fix(gen:docker): export Generator --- src/generators/docker/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 18b5c3a61..65dbe5454 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -5,7 +5,7 @@ import path from 'path'; import {Base} from 'yeoman-generator'; import Promise from 'bluebird'; -class Generator extends Base { +export default class Generator extends Base { constructor(...args) { super(...args); From b2112f50122a3e4c0c9fbebab5a5004ce32e6fe9 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Mon, 27 Jun 2016 16:45:49 -0400 Subject: [PATCH 009/104] fix(gen:docker): fix generator export --- src/generators/docker/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 65dbe5454..979befe57 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -5,7 +5,7 @@ import path from 'path'; import {Base} from 'yeoman-generator'; import Promise from 'bluebird'; -export default class Generator extends Base { +export class Generator extends Base { constructor(...args) { super(...args); @@ -41,3 +41,5 @@ export default class Generator extends Base { }); } } + +module.exports = Generator; From 89f8ca84c7cde13fd8836ae1a757bfc66d7a38d5 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 5 Jul 2016 13:39:15 -0400 Subject: [PATCH 010/104] fix(gen:docker): import genBase --- src/generators/docker/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 979befe57..ffb845bbd 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -4,6 +4,7 @@ import chalk from 'chalk'; import path from 'path'; import {Base} from 'yeoman-generator'; import Promise from 'bluebird'; +import {genBase} from '../generator-base'; export class Generator extends Base { constructor(...args) { From 088267d3573c498cacfad402924eeb541803e983 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Mon, 11 Jul 2016 21:09:38 +1000 Subject: [PATCH 011/104] fix(gen:docker): allow for grunt or gulp builds --- src/generators/docker/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index ffb845bbd..14865141d 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -29,8 +29,10 @@ export class Generator extends Base { gruntBuild() { this.log(chalk.bold('\nBuilding dist folder, please wait...')); + var buildCommand = this.filters.grunt ? 'grunt build' : 'gulp build'; + return new Promise((resolve, reject) => { - var child = exec('grunt build', (err, stdout) => { + var child = exec(buildCommand, (err, stdout) => { if(err) return reject(err); resolve(); From d020cf52c71713447b07f27eb22e40a4b83667a7 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Tue, 12 Jul 2016 19:57:25 +1000 Subject: [PATCH 012/104] fix(gen:docker): add docker.md --- docs/generators/docker.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/generators/docker.md diff --git a/docs/generators/docker.md b/docs/generators/docker.md new file mode 100644 index 000000000..e37637ba8 --- /dev/null +++ b/docs/generators/docker.md @@ -0,0 +1,22 @@ +### Docker + +Adding a Dockerfile + + yo angular-fullstack:docker + +This will add a Dockerfile to your dist folder + +This file will survive `clean` operations so if it isn't to your requirements you can change it without losing it + + +#### Upstream Image + +* includes node modules for the angular-fullstack version in use + +* uses an official node.js image + +* incorporarates changes automatically using the hub.docker infrastructure + + + + From 1ed74267221a48fc0255c3a5daed06d292d2aec6 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Wed, 13 Jul 2016 20:10:26 +1000 Subject: [PATCH 013/104] fix(gen:docker): add update of docker image to ci --- circle.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/circle.yml b/circle.yml index 31795bcd5..c771f6851 100644 --- a/circle.yml +++ b/circle.yml @@ -25,3 +25,11 @@ notify: # A list of hook hashes, containing the url field # gitter hook - url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789 + +## Deployments +deployment: + docker: + # update the upstream dockerfile after a push + branch: [master, docker-integration] + commands: + - ./angular-fullstack-dockerfile/create_branch.sh From 4d07449f71f787f71ba623c9144b86c72bdc1ef8 Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Wed, 13 Jul 2016 20:22:56 +1000 Subject: [PATCH 014/104] fix(gen:docker): fix circleci machine --- circle.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/circle.yml b/circle.yml index c771f6851..824a01e9d 100644 --- a/circle.yml +++ b/circle.yml @@ -5,6 +5,11 @@ machine: post: - npm install -g gulp-cli grunt-cli bower + - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' + - sudo apt-get update + - sudo apt-get install google-chrome-stable + ## Customize checkout checkout: post: From 2cd903d204c03a1cebbc42603064ad294b8ea62f Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Wed, 13 Jul 2016 20:48:25 +1000 Subject: [PATCH 015/104] fix(gen:docker): fix path to deployment step --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 824a01e9d..97cda0199 100644 --- a/circle.yml +++ b/circle.yml @@ -37,4 +37,4 @@ deployment: # update the upstream dockerfile after a push branch: [master, docker-integration] commands: - - ./angular-fullstack-dockerfile/create_branch.sh + - generator-angular-fullstack/angular-fullstack-dockerfile/create_branch.sh From d98e2dd4e99b59fbfe37d532d0c1cbbfed8b1235 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 27 Jul 2016 12:42:34 -0400 Subject: [PATCH 016/104] docs(getting-started): add getting-started/index.md --- docs/getting-started/index.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docs/getting-started/index.md diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md new file mode 100644 index 000000000..17d1d0f3e --- /dev/null +++ b/docs/getting-started/index.md @@ -0,0 +1,34 @@ +# Getting Started + +## Prerequisites + +Make sure you have all the required dependencies available: + +```bash +npm install -g yo gulp-cli generator-angular-fullstack +``` + +If you're using MongoDB (which you probably are), you'll have to install it from [here](https://www.mongodb.com/download-center#community). +You should then run the `mongod` process, which is in `/MongoDB/Server//bin/`. You'll also want a `/data/db` folder +somewhere for Mongo to put your database in. It would be wise to make a script to automate this command, and maybe even run this script on +your computer's startup. Example: + +```bash +#!/bin/bash + +/var/lib/mongo/server/3.2/bin/mongod.exe --dbpath /data/db +``` + +Make a new directory, and `cd` into it: +```bash +mkdir afs && cd $_ +``` + +Run `yo angular-fullstack`, optionally passing an app name: +```bash +yo angular-fullstack +``` + +You'll then be asked a series of questions regarding options for the generated app. Such things include using JavaScript or TypeScript, +HTML or Jade, Bootstrap, SQL, and so on. If you don't know what to answer for a question, just hitting `ENTER` will use the default options +for that question, and move on to the next one. From 6ae049c3a9000c965d773d15116e0b85c628bc3e Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 27 Jul 2016 16:21:32 -0400 Subject: [PATCH 017/104] docs(readme): add link to getting started [skip ci] --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index dfaf24c7b..7ff2336f8 100644 --- a/readme.md +++ b/readme.md @@ -38,6 +38,8 @@ yo angular-fullstack [app-name] Run `gulp build` for building, `gulp serve` for development, and `gulp serve:dist` for a preview of the built app. +**See the [Getting Started](/docs/getting-started/index.md) guide for more information.** + ## Prerequisites * MongoDB - Download and Install [MongoDB](https://www.mongodb.com/download-center#community) - If you plan on scaffolding your project with mongoose, you'll need mongoDB to be installed and have the `mongod` process running. From 5d7caf8c4f46850422321e16b5560b4f41652722 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 27 Jul 2016 16:23:04 -0400 Subject: [PATCH 018/104] docs(readme): simplify usage section [skip ci] --- readme.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/readme.md b/readme.md index 7ff2336f8..d4eaab809 100644 --- a/readme.md +++ b/readme.md @@ -26,18 +26,11 @@ npm install -g yo gulp-cli generator-angular-fullstack > To install the latest 4.0.0 Beta with Webpack support, use `generator-angular-fullstack@beta` -Make a new directory, and `cd` into it: +Run `yo angular-fullstack` ``` -mkdir my-new-project && cd $_ +yo angular-fullstack ``` -Run `yo angular-fullstack`, optionally passing an app name: -``` -yo angular-fullstack [app-name] -``` - -Run `gulp build` for building, `gulp serve` for development, and `gulp serve:dist` for a preview of the built app. - **See the [Getting Started](/docs/getting-started/index.md) guide for more information.** ## Prerequisites From f11336d28f6c2287bd6f1a134d0cc014898960bd Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 27 Jul 2016 16:25:38 -0400 Subject: [PATCH 019/104] chore(package): pin sequelize to a higher version fixes SQLI vulnerability --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index da24c6ced..9b92a4356 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -40,7 +40,7 @@ "mongoose": "^4.1.2", "bluebird": "^3.3.3", "connect-mongo": "^1.2.1",<% } %><% if(filters.sequelize) { %> - "sequelize": "^3.5.1", + "sequelize": "^3.23.6", "sqlite3": "~3.1.1", "express-sequelize-session": "0.4.0",<% } %><% if(filters.auth) { %> "jsonwebtoken": "^7.0.0", From fe34e78376d2def93c481f6cc62e37626d27bfe5 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 27 Jul 2016 17:04:38 -0400 Subject: [PATCH 020/104] docs(readme): dont' specify exact node versions in generated readme [skip ci] --- templates/app/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/README.md b/templates/app/README.md index 68aeef789..291bfa652 100644 --- a/templates/app/README.md +++ b/templates/app/README.md @@ -7,7 +7,7 @@ This project was generated with the [Angular Full-Stack Generator](https://githu ### Prerequisites - [Git](https://git-scm.com/) -- [Node.js and npm](nodejs.org) Node ^4.4.6, npm ^2.15.5 +- [Node.js and npm](nodejs.org) Node >= 4.x.x, npm >= 2.x.x - [Gulp](http://gulpjs.com/) (`npm install --global gulp`)<% if(filters.mongoose) { %> - [MongoDB](https://www.mongodb.org/) - Keep a running daemon with `mongod`<% } if(filters.sequelize) { %> - [SQLite](https://www.sqlite.org/quickstart.html)<% } %> From 13f20bafa062a52ae69d9816cc57721838ee60f1 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 27 Jul 2016 17:35:38 -0400 Subject: [PATCH 021/104] docs(getting-started): add step1-overview (stub) [skip ci] --- docs/getting-started/step1-overview.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/getting-started/step1-overview.md diff --git a/docs/getting-started/step1-overview.md b/docs/getting-started/step1-overview.md new file mode 100644 index 000000000..9e41fcd18 --- /dev/null +++ b/docs/getting-started/step1-overview.md @@ -0,0 +1,22 @@ +[#STUB] + +# Project Overview + +Now that you've got a Full-Stack Angular project scaffolded, lets go over how everything is structured. + +The first thing you should notice at the root of where you ran the generator is a `README.md` file. +Go ahead and listen to the angry filename and read it, then come back here. + +You should have everything you need installed now. Find the `package.json` file. +That file tells npm which dependencies to install, as well as a few other things about your app. + +Now find the `gulpfile.babel.js`. Pretty much everthing you do with your app from now on will have something to do with this file. +[Gulp](http://gulpjs.com/) is a task runner that runs on top of Node. It automates tasks such as compiling code, copying files, +running different test commands, running your server, building your code for distribution, and on and on. +Let's go over some of the most important Gulp tasks: + +* `serve` - +* `build` - +* `test` - + +[webpack] From 13a4e4f62ad9b459b8f2ca5e7b832afd87a76a6a Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 28 Jul 2016 13:36:55 -0400 Subject: [PATCH 022/104] docs(getting-started): write out the rest of the getting started page [skip ci] --- docs/getting-started/step1-overview.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/getting-started/step1-overview.md b/docs/getting-started/step1-overview.md index 9e41fcd18..5db41aec4 100644 --- a/docs/getting-started/step1-overview.md +++ b/docs/getting-started/step1-overview.md @@ -1,5 +1,3 @@ -[#STUB] - # Project Overview Now that you've got a Full-Stack Angular project scaffolded, lets go over how everything is structured. @@ -15,8 +13,10 @@ Now find the `gulpfile.babel.js`. Pretty much everthing you do with your app fro running different test commands, running your server, building your code for distribution, and on and on. Let's go over some of the most important Gulp tasks: -* `serve` - -* `build` - -* `test` - +* `gulp serve` - This will build the code for development use, run a dev server, and open up the application in your default browser. +* `gulp build` - This will build the code into the `dist/` folder, which you can then distribute to your production servers. +* `gulp test` - This will run client and server unit + integration tests. + +## Webpack -[webpack] +Webpack is a module bundler for front-end web applications. Basically it takes all of your front-end files (JavaScript source + libs, CSS, HTML, etc) and bundles them all up into intelligently laid-out JavaScript bundles. It uses CommonJS to `import`/`export` modules/assets. The takeaway here is that instead of loading your JS files directly in the browser, instead you'll be loading the webpack bundles. Also, instead of everything naively using the global browser scope, you'll need to `import`/`export` anything you'd like to use. We'll look into this in greater detail later. From 065194de9366b5dcbb117320116bbab63e343031 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 2 Aug 2016 14:19:25 -0400 Subject: [PATCH 023/104] docs(readme): update configurations [skip ci] --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index d4eaab809..3bf1b87c7 100644 --- a/readme.md +++ b/readme.md @@ -53,7 +53,7 @@ yo angular-fullstack **Client** * Scripts: `JavaScript (Babel)`, `TypeScript` -* Module Systems: `Bower`, `Webpack` (soon), `SystemJS + JSPM` (planned) +* Module Systems: `Webpack`, `SystemJS + JSPM` (maybe) * Markup: `HTML`, `Jade` * Stylesheets: `CSS`, `Stylus`, `Sass`, `Less` * Angular Routers: `ngRoute`, `ui-router` @@ -67,7 +67,7 @@ yo angular-fullstack * `None`, * `MongoDB`, `SQL` * Authentication boilerplate: `Yes`, `No` - * oAuth integrations: `Facebook` `Twitter` `Google` + * oAuth integrations: `Facebook`, `Twitter`, `Google` * Socket.io integration: `Yes`, `No` From a11c986a5a40c2f392739b761a6ccbd9d1d25b71 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 2 Aug 2016 14:20:44 -0400 Subject: [PATCH 024/104] docs(readme): add note about generator-ng-component [skip ci] --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 3bf1b87c7..ac24de5f2 100644 --- a/readme.md +++ b/readme.md @@ -79,7 +79,7 @@ Available generators: - [angular-fullstack](/docs/generators/app.md) (aka [angular-fullstack:app](/docs/generators/app.md)) * Server Side - [angular-fullstack:endpoint](/docs/generators/endpoint.md) -* Client Side +* Client Side (via [generator-ng-component](https://github.com/DaftMonk/generator-ng-component)) - [angular-fullstack:route](/docs/generators/route.md) - [angular-fullstack:component](/docs/generators/component.md) - [angular-fullstack:controller](/docs/generators/controller.md) From 23dc3345c0b92fb7aeab789dc81d7b9a16493c9a Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 2 Aug 2016 14:21:14 -0400 Subject: [PATCH 025/104] docs(index): add note about generator-ng-component [skip ci] --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 043388816..3def90f9e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,7 +8,7 @@ Available generators: - [angular-fullstack](/docs/generators/app.md) (aka [angular-fullstack:app](/docs/generators/app.md)) * Server Side - [angular-fullstack:endpoint](/docs/generators/endpoint.md) -* Client Side +* Client Side (via [generator-ng-component](https://github.com/DaftMonk/generator-ng-component)) - [angular-fullstack:route](/docs/generators/route.md) - [angular-fullstack:component](/docs/generators/component.md) - [angular-fullstack:controller](/docs/generators/controller.md) From e41504144e4b35b1f07f86a9f249d5e3a1df36b9 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 2 Aug 2016 14:27:37 -0400 Subject: [PATCH 026/104] ci(circle): comment out sauce-connect --- circle.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/circle.yml b/circle.yml index ad8bf69e5..66ef8cbae 100644 --- a/circle.yml +++ b/circle.yml @@ -17,9 +17,9 @@ dependencies: # builds. If you need to, you can add custom paths to cache: cache_directories: - "test/fixtures/node_modules" - post: - - wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz - - tar -xzf sc-latest-linux.tar.gz +# post: +# - wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz +# - tar -xzf sc-latest-linux.tar.gz ## Custom notifications #notify: @@ -29,11 +29,11 @@ notify: # gitter hook - url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789 -test: - pre: - - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready: - background: true - # Wait for tunnel to be ready - - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done - post: - - killall --wait sc # wait for Sauce Connect to close the tunnel +#test: +# pre: +# - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready: +# background: true +# # Wait for tunnel to be ready +# - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done +# post: +# - killall --wait sc # wait for Sauce Connect to close the tunnel From 318a04f44517eadbefa50231dcfbbdae31de42ce Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Tue, 2 Aug 2016 22:19:34 +0200 Subject: [PATCH 027/104] chore(package): update mocha to version 3.0.0 (#2102) https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 910b44953..dcc0b5ff9 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "lazypipe": "^1.0.1", "merge-stream": "^1.0.0", "minimatch": "^3.0.2", - "mocha": "^2.5.2", + "mocha": "^3.0.0", "q": "^1.0.1", "recursive-readdir": "^2.0.0", "run-sequence": "^1.2.1", From a8990d803daa10b9039ed28c6e22edab65dbff64 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Wed, 3 Aug 2016 00:24:22 +0200 Subject: [PATCH 028/104] chore(package): update gulp-mocha to version 3.0.0 (#2105) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dcc0b5ff9..35359f651 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "grunt-release": "^0.14.0", "gulp": "^3.9.1", "gulp-if": "^2.0.1", - "gulp-mocha": "^2.2.0", + "gulp-mocha": "^3.0.0", "gulp-plumber": "^1.1.0", "gulp-util": "^3.0.7", "jit-grunt": "~0.10.0", From 691ffac3c302b63f1686c03497437584a6a5a87f Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Wed, 3 Aug 2016 02:34:07 +0200 Subject: [PATCH 029/104] chore(package): update should to version 10.0.0 (#2072) https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 35359f651..c58f8dbe1 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "recursive-readdir": "^2.0.0", "run-sequence": "^1.2.1", "shelljs": "^0.7.0", - "should": "^9.0.2", + "should": "^10.0.0", "yeoman-assert": "^2.0.0", "yeoman-test": "~1.4.0" }, From 616000c949a66776809fde9735300e0907dfabe5 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Wed, 3 Aug 2016 16:44:47 +0200 Subject: [PATCH 030/104] chore(package): update glob to version 7.0.5 (#1995) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c58f8dbe1..4f3607039 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "bluebird": "^3.3.5", "chalk": "^1.1.0", "generator-ng-component": "~1.0.1", - "glob": "^7.0.3", + "glob": "^7.0.5", "gulp-babel": "^6.1.2", "gulp-beautify": "^2.0.0", "gulp-filter": "^4.0.0", From fd2514e0be6f2f9df8e691dd3b9da1751c9d84a1 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Thu, 4 Aug 2016 17:34:14 +0200 Subject: [PATCH 031/104] chore(package): update babel-register to version 6.11.6 (#2089) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f3607039..ee979a674 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "devDependencies": { "babel-plugin-transform-class-properties": "^6.9.0", "babel-preset-es2015": "^6.6.0", - "babel-register": "^6.6.5", + "babel-register": "^6.11.6", "chai": "^3.2.0", "del": "^2.2.0", "grunt": "^1.0.1", From bc8cd471d5754d4a6fd257ca21cc9296233c1561 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Thu, 4 Aug 2016 17:49:23 +0200 Subject: [PATCH 032/104] chore(package): update lodash to version 4.14.1 (#2098) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee979a674..44c55cdf4 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "gulp-filter": "^4.0.0", "gulp-tap": "^0.1.3", "insight": "~0.8.1", - "lodash": "^4.13.1", + "lodash": "^4.14.1", "semver": "^5.1.0", "underscore.string": "^3.1.1", "yeoman-generator": "~0.24.1", From 1b02f4726528034b33afce41cb4616326bf5dde4 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Thu, 4 Aug 2016 18:05:29 +0200 Subject: [PATCH 033/104] chore(package): update insight to version 0.8.3 (#2106) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44c55cdf4..3784694d1 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "gulp-beautify": "^2.0.0", "gulp-filter": "^4.0.0", "gulp-tap": "^0.1.3", - "insight": "~0.8.1", + "insight": "~0.8.3", "lodash": "^4.14.1", "semver": "^5.1.0", "underscore.string": "^3.1.1", From ac0648f33efdd221209170875038f5b7a7e82654 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 4 Aug 2016 15:37:32 -0400 Subject: [PATCH 034/104] chore(server): replace compression with shrink-ray (#2114) --- templates/app/_package.json | 2 +- templates/app/server/config/express.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index 9b92a4356..bdc199c62 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -28,7 +28,6 @@ "cookie-parser": "^1.3.5", "express-session": "^1.11.3", "errorhandler": "^1.4.2", - "compression": "^1.5.2", "composable-middleware": "^0.3.0", "fast-json-patch": "^1.0.0", "lodash": "^4.6.1", @@ -54,6 +53,7 @@ "socket.io-client": "^1.3.5", "socketio-jwt": "^4.2.0",<% } %> "serve-favicon": "^2.3.0", + "shrink-ray": "^0.1.3", "sprint-js": "~0.1.0" }, "devDependencies": { diff --git a/templates/app/server/config/express.js b/templates/app/server/config/express.js index 993fb7a8d..7971a2b00 100644 --- a/templates/app/server/config/express.js +++ b/templates/app/server/config/express.js @@ -7,7 +7,7 @@ import express from 'express'; import favicon from 'serve-favicon'; import morgan from 'morgan'; -import compression from 'compression'; +import shrinkRay from 'shrink-ray'; import bodyParser from 'body-parser'; import methodOverride from 'method-override'; import cookieParser from 'cookie-parser'; @@ -49,7 +49,7 @@ export default function(app) { app.engine('html', require('ejs').renderFile); app.set('view engine', 'html');<% } %><% if (filters.jade) { %> app.set('view engine', 'jade');<% } %> - app.use(compression()); + app.use(shrinkRay()); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.use(methodOverride()); From 022119a3c95bf08faf427e616c68470555427fe4 Mon Sep 17 00:00:00 2001 From: Koslun Date: Fri, 5 Aug 2016 13:09:23 +0200 Subject: [PATCH 035/104] fix(gulp:build): remove typings task from non-ts The typings task was erroneously included in the gulp build even in non-typescript scaffolds. fixes #2110 --- templates/app/gulpfile.babel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index 3272062f0..ed8bd349f 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -491,8 +491,8 @@ gulp.task('build', cb => { 'inject', 'transpile:server', [ - 'build:images', - 'typings' + 'build:images'<% if(filters.ts) { %>, + 'typings'<% } %> ], [ 'copy:extras', From 37072031d35ee695fd82e5bf6ee3989778a371e1 Mon Sep 17 00:00:00 2001 From: Koslun Date: Fri, 5 Aug 2016 13:24:00 +0200 Subject: [PATCH 036/104] fix(gulp:build): fix crash upon ts type errors TS somehow started emitting the type errors as errors that are then propagating to webpack and finally gulp. Thus need to catch and recover from thrown errors. closes #2039, #2110 --- templates/app/gulpfile.babel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index ed8bd349f..dae0cb2f5 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -236,6 +236,9 @@ gulp.task('webpack:dist', function() { const webpackDistConfig = makeWebpackConfig({ BUILD: true }); return gulp.src(webpackDistConfig.entry.app) .pipe(webpack(webpackDistConfig)) + .on('error', (err) => { + this.emit('end'); // Recover from errors + }) .pipe(gulp.dest(`${paths.dist}/client`)); }); From da98690f3df1a8246a8302de8c257103fa1346e5 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sun, 12 Jun 2016 15:17:56 -0400 Subject: [PATCH 037/104] chore(gulp): update imagemin --- templates/app/_package.json | 2 +- templates/app/gulpfile.babel.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index bdc199c62..89f78bf9e 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -91,7 +91,7 @@ "gulp-env": "^0.4.0", "gulp-eslint": "^2.0.0", "gulp-filter": "^4.0.0", - "gulp-imagemin": "^2.2.1", + "gulp-imagemin": "^3.0.1", "gulp-inject": "^4.0.0", "gulp-istanbul": "~0.10.3", "gulp-istanbul-enforcer": "^1.0.3", diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index dae0cb2f5..19d6b6d1c 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -512,11 +512,12 @@ gulp.task('clean:dist', () => del([`${paths.dist}/!(.git*|.openshift|Procfile)** gulp.task('build:images', () => { return gulp.src(paths.client.images) - .pipe(plugins.imagemin({ - optimizationLevel: 5, - progressive: true, - interlaced: true - })) + .pipe(plugins.imagemin([ + plugins.imagemin.optipng({optimizationLevel: 5}), + plugins.imagemin.mozjpeg({progressive: true}), + plugins.imagemin.gifsicle({interlaced: true}), + plugins.imagemin.svgo({plugins: [{removeViewBox: false}]}) + ])) .pipe(plugins.rev()) .pipe(gulp.dest(`${paths.dist}/${clientPath}/assets/images`)) .pipe(plugins.rev.manifest(`${paths.dist}/${paths.client.revManifest}`, { From 346b3be2a9f96523d50a7adf56107c16b3b58e4e Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 6 Jul 2016 23:47:16 +0200 Subject: [PATCH 038/104] chore(gulp): switch to new jpeg minifier --- templates/app/gulpfile.babel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index 19d6b6d1c..41977982d 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -514,7 +514,7 @@ gulp.task('build:images', () => { return gulp.src(paths.client.images) .pipe(plugins.imagemin([ plugins.imagemin.optipng({optimizationLevel: 5}), - plugins.imagemin.mozjpeg({progressive: true}), + plugins.imagemin.jpegtran({progressive: true}), plugins.imagemin.gifsicle({interlaced: true}), plugins.imagemin.svgo({plugins: [{removeViewBox: false}]}) ])) From 03c1cf559f1f8a1128aabf42d7f07565826c677b Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sat, 6 Aug 2016 03:37:04 -0400 Subject: [PATCH 039/104] fix(server): fix dev-only imports (#2124) move strip-ansi & browsersync to dev-only section --- templates/app/server/config/express.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/templates/app/server/config/express.js b/templates/app/server/config/express.js index 7971a2b00..4fdf23197 100644 --- a/templates/app/server/config/express.js +++ b/templates/app/server/config/express.js @@ -26,9 +26,6 @@ var MongoStore = connectMongo(session);<% } else if(filters.sequelize) { %> import sqldb from '../sqldb'; import expressSequelizeSession from 'express-sequelize-session'; var Store = expressSequelizeSession(session.Store);<% } %> -import stripAnsi from 'strip-ansi'; - -var browserSync = require('browser-sync').create(); export default function(app) { var env = app.get('env'); @@ -92,10 +89,12 @@ export default function(app) { if ('development' === env) { const webpackDevMiddleware = require('webpack-dev-middleware'); + const stripAnsi = require('strip-ansi'); const webpack = require('webpack'); const makeWebpackConfig = require('../../webpack.make'); const webpackConfig = makeWebpackConfig({ DEV: true }); const compiler = webpack(webpackConfig); + const browserSync = require('browser-sync').create(); /** * Run Browsersync and use middleware for Hot Module Replacement @@ -128,7 +127,7 @@ export default function(app) { if (stats.hasErrors() || stats.hasWarnings()) { return browserSync.sockets.emit('fullscreen:message', { title: "Webpack Error:", - body: stripAnsi(stats.toString()), + body: stripAnsi(stats.toString()), timeout: 100000 }); } From 1a7100aab5aac70ab3ed4d2f4012035f7c1794fe Mon Sep 17 00:00:00 2001 From: "Dan K.K" Date: Sun, 7 Aug 2016 04:48:30 +0600 Subject: [PATCH 040/104] chore(package): update node/npm versions in the generated package.json (#2126) Update required engine versions in the generated `package.json` to make it same as in the generator's `package.json`. --- templates/app/_package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index 89f78bf9e..694b0f65a 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -189,8 +189,8 @@ "typings": "^0.8.1"<% } %> }, "engines": { - "node": "^4.4.6", - "npm": "^2.15.5" + "node": "^6.2.2", + "npm": "^3.9.5" }, "scripts": { "test": "gulp test", From f5988a2f92d35dcda46aee975f40b607a05555f7 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Fri, 5 Aug 2016 12:52:34 -0400 Subject: [PATCH 041/104] chore(package): remove old unused deps closes #2113 --- templates/app/_package.json | 24 +----------------------- templates/app/gulpfile.babel.js | 3 +-- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index 89f78bf9e..f1993581c 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -78,59 +78,38 @@ "eslint": "^2.12.0", "del": "^2.0.2", "gulp": "^3.9.1", - "gulp-add-src": "^0.2.0", - "gulp-angular-templatecache": "^2.0.0", - "gulp-autoprefixer": "^3.1.0", "gulp-babel": "^6.1.2",<% if(filters.ts) { %> "gulp-typescript": "~2.13.0", "gulp-typings": "^1.3.6", "gulp-tslint": "^5.0.0", "ts-helpers": "1.1.1",<% } %> - "gulp-cache": "^0.4.2", - "gulp-concat": "^2.6.0", "gulp-env": "^0.4.0", "gulp-eslint": "^2.0.0", - "gulp-filter": "^4.0.0", "gulp-imagemin": "^3.0.1", "gulp-inject": "^4.0.0", "gulp-istanbul": "~0.10.3", "gulp-istanbul-enforcer": "^1.0.3", "gulp-load-plugins": "^1.0.0-rc.1", - "gulp-clean-css": "^2.0.6", "gulp-mocha": "^2.1.3", - "gulp-ng-annotate": "^2.0.0", "gulp-node-inspector": "^0.1.0", "gulp-plumber": "^1.0.1", "gulp-protractor": "^2.1.0", - "gulp-rename": "^1.2.2", "gulp-rev": "^7.0.0", "gulp-rev-replace": "^0.4.2", "gulp-sort": "^2.0.0", "gulp-sourcemaps": "^1.5.2", - "gulp-svgmin": "^1.1.2", - "gulp-uglify": "^1.2.0", - "gulp-useref": "^3.0.3", "gulp-util": "^3.0.5", - "gulp-watch": "^4.3.5",<% if(filters.jade) { %> - "gulp-jade": "^1.0.1",<% } if(filters.stylus) { %> - "gulp-stylus": "^2.0.4", + "gulp-watch": "^4.3.5", "gulp-stylint": "^3.0.0", - "nib": "^1.1.0",<% } if(filters.sass) { %> - "gulp-sass": "^2.2.0", - "gulp-scss-lint": "^0.3.9",<% } if(filters.less) { %> - "gulp-less": "^3.0.3", - "gulp-recess": "^1.1.2",<% } %> "grunt": "^1.0.1", "grunt-build-control": "^0.7.0", "isparta": "^4.0.0", - "utile": "~0.3.0", "nodemon": "^1.3.7", "run-sequence": "^1.1.0", "lazypipe": "^1.0.1", <%# WEBPACK %> "webpack": "^1.12.14", "webpack-dev-middleware": "^1.5.1", - "webpack-dev-server": "~1.14.0", "webpack-stream": "^3.2.0", "extract-text-webpack-plugin": "^1.0.1", "html-webpack-plugin": "^2.16.0", @@ -156,7 +135,6 @@ "less-loader": "^2.2.3",<% } %> <%_ if(filters.stylus) { _%> "stylus-loader": "^2.1.1",<% } %> - "tiny-lr": "^0.2.1", "karma-webpack": "^1.7.0", <%# END WEBPACK %> "through2": "^2.0.1", diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index 41977982d..dc7db2ed3 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -15,8 +15,7 @@ import nodemon from 'nodemon'; import {Server as KarmaServer} from 'karma'; import runSequence from 'run-sequence'; import {protractor, webdriver_update} from 'gulp-protractor'; -import {Instrumenter} from 'isparta';<% if(filters.stylus) { %> -import nib from 'nib';<% } %> +import {Instrumenter} from 'isparta'; import webpack from 'webpack-stream'; import makeWebpackConfig from './webpack.make'; From 244cca7026532dc6b92a0d59d3cc6efeb8cef911 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Fri, 5 Aug 2016 13:18:49 -0400 Subject: [PATCH 042/104] chore(package): exclude bootstrap-styl if !bootstrap --- templates/app/_package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index f1993581c..4678737a5 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -59,7 +59,8 @@ "devDependencies": { <%# CLIENT %> "angular-mocks": "~1.5.5",<% if(filters.stylus) { %> - "bootstrap-styl": "^5.0.5", + <%_ if(filters.bootstrap) { -%> + "bootstrap-styl": "^5.0.5",<% } %> "font-awesome-stylus": "^4.6.2",<% } %> <%# END CLIENT %> "autoprefixer": "^6.0.0", From 3abd0390aa3b76c6a30b3b966c73d8ddcba0a522 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sun, 7 Aug 2016 21:49:45 -0400 Subject: [PATCH 043/104] chore(package): set istanbul to 1.1.0-alpha.1 (#2035) --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index a2e0756db..b8086912b 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -140,7 +140,7 @@ <%# END WEBPACK %> "through2": "^2.0.1", "open": "~0.0.4", - "istanbul": "~0.4.1", + "istanbul": "1.1.0-alpha.1", "chai": "^3.2.0", "sinon": "^1.16.1", "chai-as-promised": "^5.1.0", From 65c765586550bef048a807f935f04ff73e61e4f2 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sun, 7 Aug 2016 21:50:05 -0400 Subject: [PATCH 044/104] chore(gen): replace all instances of jade with pug (#2128) closes #1802 --- ISSUE_TEMPLATE.md | 2 +- docs/getting-started/index.md | 2 +- readme.md | 2 +- src/generators/app/index.js | 6 +++--- src/test/get-expected-files.js | 2 +- src/test/main.test.js | 8 ++++---- templates/app/_package.json | 6 +++--- .../login/{login(jade).jade => login(pug).pug} | 0 .../settings/{settings(jade).jade => settings(pug).pug} | 0 .../signup/{signup(jade).jade => signup(pug).pug} | 0 .../app/admin(auth)/{admin(jade).jade => admin(pug).pug} | 0 .../client/app/main/{main(jade).jade => main(pug).pug} | 0 .../footer/{footer(jade).jade => footer(pug).pug} | 0 .../{modal(jade).jade => modal(pug).pug} | 0 .../navbar/{navbar(jade).jade => navbar(pug).pug} | 0 .../{oauth-buttons(jade).jade => oauth-buttons(pug).pug} | 0 templates/app/server/config/express.js | 4 ++-- .../app/server/views/{404(jade).jade => 404(pug).pug} | 0 templates/app/webpack.make.js | 2 +- test/fixtures/.yo-rc.json | 3 ++- 20 files changed, 19 insertions(+), 18 deletions(-) rename templates/app/client/app/account(auth)/login/{login(jade).jade => login(pug).pug} (100%) rename templates/app/client/app/account(auth)/settings/{settings(jade).jade => settings(pug).pug} (100%) rename templates/app/client/app/account(auth)/signup/{signup(jade).jade => signup(pug).pug} (100%) rename templates/app/client/app/admin(auth)/{admin(jade).jade => admin(pug).pug} (100%) rename templates/app/client/app/main/{main(jade).jade => main(pug).pug} (100%) rename templates/app/client/components/footer/{footer(jade).jade => footer(pug).pug} (100%) rename templates/app/client/components/modal(uibootstrap)/{modal(jade).jade => modal(pug).pug} (100%) rename templates/app/client/components/navbar/{navbar(jade).jade => navbar(pug).pug} (100%) rename templates/app/client/components/oauth-buttons(oauth)/{oauth-buttons(jade).jade => oauth-buttons(pug).pug} (100%) rename templates/app/server/views/{404(jade).jade => 404(pug).pug} (100%) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 6cf5aa437..cf31e70c0 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -11,7 +11,7 @@ etc | etc Item | Answer ----- | ----- Transpiler | Babel / TypeScript -Markup | HTML / Jade +Markup | HTML / Pug CSS | CSS / LESS / SCSS / Stylus Router | ngRoute / ui-router Client Tests | Jasmine / Mocha diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 17d1d0f3e..1c728659c 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -30,5 +30,5 @@ yo angular-fullstack ``` You'll then be asked a series of questions regarding options for the generated app. Such things include using JavaScript or TypeScript, -HTML or Jade, Bootstrap, SQL, and so on. If you don't know what to answer for a question, just hitting `ENTER` will use the default options +HTML or Pug, Bootstrap, SQL, and so on. If you don't know what to answer for a question, just hitting `ENTER` will use the default options for that question, and move on to the next one. diff --git a/readme.md b/readme.md index ac24de5f2..fbf6865cb 100644 --- a/readme.md +++ b/readme.md @@ -54,7 +54,7 @@ yo angular-fullstack * Scripts: `JavaScript (Babel)`, `TypeScript` * Module Systems: `Webpack`, `SystemJS + JSPM` (maybe) -* Markup: `HTML`, `Jade` +* Markup: `HTML`, `Pug` * Stylesheets: `CSS`, `Stylus`, `Sass`, `Less` * Angular Routers: `ngRoute`, `ui-router` * CSS Frameworks: `Bootstrap` diff --git a/src/generators/app/index.js b/src/generators/app/index.js index 3e199b59a..ae48e4c82 100644 --- a/src/generators/app/index.js +++ b/src/generators/app/index.js @@ -119,7 +119,7 @@ export class Generator extends Base { this.filters = existingFilters; this.scriptExt = this.filters.ts ? 'ts' : 'js'; - this.templateExt = this.filters.jade ? 'jade' : 'html'; + this.templateExt = this.filters.pug ? 'pug' : 'html'; this.styleExt = this.filters.sass ? 'scss' : this.filters.less ? 'less' : this.filters.stylus ? 'styl' : @@ -169,7 +169,7 @@ export class Generator extends Base { type: 'list', name: 'markup', message: 'What would you like to write markup with?', - choices: ['HTML', 'Jade'], + choices: ['HTML', 'Pug'], filter: val => val.toLowerCase() }, { type: 'list', @@ -408,7 +408,7 @@ export class Generator extends Base { if(this.filters.ts) extensions.push('ts'); if(this.filters.js) extensions.push('js'); if(this.filters.html) extensions.push('html'); - if(this.filters.jade) extensions.push('jade'); + if(this.filters.pug) extensions.push('pug'); if(this.filters.css) extensions.push('css'); if(this.filters.stylus) extensions.push('styl'); if(this.filters.sass) extensions.push('scss'); diff --git a/src/test/get-expected-files.js b/src/test/get-expected-files.js index d70c7c101..70b4bfc9c 100644 --- a/src/test/get-expected-files.js +++ b/src/test/get-expected-files.js @@ -14,7 +14,7 @@ export function app(options) { css: 'css' }, markup: { - jade: 'jade', + pug: 'pug', html: 'html' }, script: { diff --git a/src/test/main.test.js b/src/test/main.test.js index c34b1ade0..79dbfff5d 100644 --- a/src/test/main.test.js +++ b/src/test/main.test.js @@ -183,7 +183,7 @@ describe('angular-fullstack:app', function() { }); }); - describe('with TypeScript, Jade, Jasmine, LESS, & OAuth', function() { + describe('with TypeScript, Pug, Jasmine, LESS, & OAuth', function() { var dir; var lintResult; var clientTestResult; @@ -191,7 +191,7 @@ describe('angular-fullstack:app', function() { var testOptions = { buildtool: 'gulp', transpiler: 'ts', - markup: 'jade', + markup: 'pug', stylesheet: 'less', router: 'uirouter', testing: 'jasmine', @@ -263,7 +263,7 @@ describe('angular-fullstack:app', function() { var testOptions = { buildtool: 'gulp', transpiler: 'babel', - markup: 'jade', + markup: 'pug', stylesheet: 'css', router: 'uirouter', testing: 'jasmine', @@ -335,7 +335,7 @@ describe('angular-fullstack:app', function() { var testOptions = { buildtool: 'gulp', transpiler: 'ts', - markup: 'jade', + markup: 'pug', stylesheet: 'stylus', router: 'uirouter', testing: 'mocha', diff --git a/templates/app/_package.json b/templates/app/_package.json index b8086912b..2cf545b61 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -33,8 +33,8 @@ "lodash": "^4.6.1", "lusca": "^1.3.0", "babel-runtime": "^6.6.1", - "babel-polyfill": "^6.7.2",<% if(filters.jade) { %> - "jade": "^1.11.0",<% } %><% if(filters.html) { %> + "babel-polyfill": "^6.7.2",<% if(filters.pug) { %> + "pug": "2.0.0-beta4",<% } %><% if(filters.html) { %> "ejs": "^2.3.3",<% } %><% if(filters.mongoose) { %> "mongoose": "^4.1.2", "bluebird": "^3.3.3", @@ -115,7 +115,7 @@ "extract-text-webpack-plugin": "^1.0.1", "html-webpack-plugin": "^2.16.0", "html-webpack-harddisk-plugin": "~0.0.2", - <%_ if(filters.jade) { _%> + <%_ if(filters.pug) { _%> "pug-html-loader": "^1.0.8",<% } %> "awesome-typescript-loader": "0.17.0", "ng-annotate-loader": "~0.1.0", diff --git a/templates/app/client/app/account(auth)/login/login(jade).jade b/templates/app/client/app/account(auth)/login/login(pug).pug similarity index 100% rename from templates/app/client/app/account(auth)/login/login(jade).jade rename to templates/app/client/app/account(auth)/login/login(pug).pug diff --git a/templates/app/client/app/account(auth)/settings/settings(jade).jade b/templates/app/client/app/account(auth)/settings/settings(pug).pug similarity index 100% rename from templates/app/client/app/account(auth)/settings/settings(jade).jade rename to templates/app/client/app/account(auth)/settings/settings(pug).pug diff --git a/templates/app/client/app/account(auth)/signup/signup(jade).jade b/templates/app/client/app/account(auth)/signup/signup(pug).pug similarity index 100% rename from templates/app/client/app/account(auth)/signup/signup(jade).jade rename to templates/app/client/app/account(auth)/signup/signup(pug).pug diff --git a/templates/app/client/app/admin(auth)/admin(jade).jade b/templates/app/client/app/admin(auth)/admin(pug).pug similarity index 100% rename from templates/app/client/app/admin(auth)/admin(jade).jade rename to templates/app/client/app/admin(auth)/admin(pug).pug diff --git a/templates/app/client/app/main/main(jade).jade b/templates/app/client/app/main/main(pug).pug similarity index 100% rename from templates/app/client/app/main/main(jade).jade rename to templates/app/client/app/main/main(pug).pug diff --git a/templates/app/client/components/footer/footer(jade).jade b/templates/app/client/components/footer/footer(pug).pug similarity index 100% rename from templates/app/client/components/footer/footer(jade).jade rename to templates/app/client/components/footer/footer(pug).pug diff --git a/templates/app/client/components/modal(uibootstrap)/modal(jade).jade b/templates/app/client/components/modal(uibootstrap)/modal(pug).pug similarity index 100% rename from templates/app/client/components/modal(uibootstrap)/modal(jade).jade rename to templates/app/client/components/modal(uibootstrap)/modal(pug).pug diff --git a/templates/app/client/components/navbar/navbar(jade).jade b/templates/app/client/components/navbar/navbar(pug).pug similarity index 100% rename from templates/app/client/components/navbar/navbar(jade).jade rename to templates/app/client/components/navbar/navbar(pug).pug diff --git a/templates/app/client/components/oauth-buttons(oauth)/oauth-buttons(jade).jade b/templates/app/client/components/oauth-buttons(oauth)/oauth-buttons(pug).pug similarity index 100% rename from templates/app/client/components/oauth-buttons(oauth)/oauth-buttons(jade).jade rename to templates/app/client/components/oauth-buttons(oauth)/oauth-buttons(pug).pug diff --git a/templates/app/server/config/express.js b/templates/app/server/config/express.js index 4fdf23197..d0cc7b99a 100644 --- a/templates/app/server/config/express.js +++ b/templates/app/server/config/express.js @@ -44,8 +44,8 @@ export default function(app) { app.set('views', config.root + '/server/views');<% if (filters.html) { %> app.engine('html', require('ejs').renderFile); - app.set('view engine', 'html');<% } %><% if (filters.jade) { %> - app.set('view engine', 'jade');<% } %> + app.set('view engine', 'html');<% } %><% if (filters.pug) { %> + app.set('view engine', 'pug');<% } %> app.use(shrinkRay()); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); diff --git a/templates/app/server/views/404(jade).jade b/templates/app/server/views/404(pug).pug similarity index 100% rename from templates/app/server/views/404(jade).jade rename to templates/app/server/views/404(pug).pug diff --git a/templates/app/webpack.make.js b/templates/app/webpack.make.js index 393e4c961..031b3e149 100644 --- a/templates/app/webpack.make.js +++ b/templates/app/webpack.make.js @@ -182,7 +182,7 @@ module.exports = function makeWebpackConfig(options) { test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)([\?]?.*)$/, loader: 'file' }, { - <%_ if(filters.jade) { _%> + <%_ if(filters.pug) { _%> // Pug HTML LOADER // Reference: https://github.com/willyelm/pug-html-loader // Allow loading Pug throw js diff --git a/test/fixtures/.yo-rc.json b/test/fixtures/.yo-rc.json index b6bc72cce..ca971c119 100644 --- a/test/fixtures/.yo-rc.json +++ b/test/fixtures/.yo-rc.json @@ -46,7 +46,8 @@ "expect", "should", "uirouter", - "es6" + "es6", + "webpack" ], "extensions": [ "babel", From 7348858963b2a662e221dcfe591bc240c05b3bb7 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Mon, 8 Aug 2016 02:02:59 -0400 Subject: [PATCH 045/104] 4.0.0 --- CHANGELOG.md | 38 +++++++++++++++++++++++++++++++++++++- angular-fullstack-deps | 2 +- package.json | 2 +- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb3bbb480..01491f087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,40 @@ + +## [4.0.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.6...v4.0.0) (2016-08-08) + + +### Notable Changes + +### [Webpack](http://webpack.github.io/) +* No more Bower +* Webpack is a Module Bundler for the front-end. +* Everything starts in `client/app.js`. It imports (using CommonJS / ES2015 imports) everything else needed from there. +* Whenever we create a new Angular 1 module, we export its name, and import that name in another module up the tree, all the way to `client/app.js`. This design pattern allows for easy lazy-loading. + +### Gulp v Grunt +Grunt has been removed. +* Gulp is significantly faster to run +* Gulp focuses on programmatic configuration, which makes it a breeze to configure compared to Grunt's JSON-config-focused configuration. +* Gulp development is much more active, with Gulp 4.0.0 hopefully being released soon. + +### ESLint +JSHint + JSCS have been replaced with ESLint. ESLint provides a gigantic amount of rules, and is easily pluggable with many plugins. It uses Espree. Also, JSCS has merged with ESLint. + +### Types +Flow support has been added. TypeScript type errors have been fixed. + +### Async/Sync Auth methods +The following methods from the client Auth service have been split into two: `getCurrentUser`, `isLoggedIn`, `hasRole`, `isAdmin`. The reason that these methods could be both synchronous and asynchronous depending on how many arguments were passed is because they were called from Angular templates. Now, the Angular templates call the sync form of these methods (e.x. `getCurrentUserSync`), and the original functions are now only async. + +### Constants +The task runner no longer takes care of creating an Angular module for config constants. It is taken care of by webpack now (the `shared.js` files is now just `require`d) + +### Endpoint PUT/PATCH +PUT now defaults to an upsert. PATCH now actually does an HTTP PATCH. + +### -Livereload +Browsersync +Livereload has been removed in favor of [Browsersync](https://www.browsersync.io/) + + ## [3.7.6](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.5...v3.7.6) (2016-06-21) @@ -8,7 +45,6 @@ * Bumped a few generator dependencies - ## [3.7.5](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.4...v3.7.5) (2016-06-02) diff --git a/angular-fullstack-deps b/angular-fullstack-deps index eada40699..f4e3efab1 160000 --- a/angular-fullstack-deps +++ b/angular-fullstack-deps @@ -1 +1 @@ -Subproject commit eada40699249e9e82510b43685f8df5f4eb6cc31 +Subproject commit f4e3efab18795e36e21c81c18f7b5ccb38e9e9b9 diff --git a/package.json b/package.json index 3784694d1..dd16a220f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-angular-fullstack", - "version": "4.0.0-rc.0", + "version": "4.0.0", "description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node", "keywords": [ "yeoman-generator", From cd1095405cdbfe1f99eeb4c7d88fe55939196505 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Mon, 8 Aug 2016 16:01:06 -0400 Subject: [PATCH 046/104] fix(webpack): fix peerDependencies for css loaders (#2131) fixes #2130 --- templates/app/_package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/app/_package.json b/templates/app/_package.json index 2cf545b61..c2da6a15d 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -131,10 +131,13 @@ "raw-loader": "^0.5.1", "style-loader": "^0.13.0", <%_ if(filters.sass) { _%> + "node-sass": "^3.8.0", "sass-loader": "^3.1.1",<% } %> <%_ if(filters.less) { _%> + "less": "^2.7.1", "less-loader": "^2.2.3",<% } %> <%_ if(filters.stylus) { _%> + "stylus": "^0.54.5", "stylus-loader": "^2.1.1",<% } %> "karma-webpack": "^1.7.0", <%# END WEBPACK %> From f37e214aa0976ebd5d82597f8d50904ee8740a8a Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Mon, 8 Aug 2016 16:31:57 -0400 Subject: [PATCH 047/104] 4.0.1 --- CHANGELOG.md | 2 +- angular-fullstack-deps | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01491f087..85d57b435 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## [4.0.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.6...v4.0.0) (2016-08-08) -### Notable Changes +## Notable Changes ### [Webpack](http://webpack.github.io/) * No more Bower diff --git a/angular-fullstack-deps b/angular-fullstack-deps index f4e3efab1..0554c3688 160000 --- a/angular-fullstack-deps +++ b/angular-fullstack-deps @@ -1 +1 @@ -Subproject commit f4e3efab18795e36e21c81c18f7b5ccb38e9e9b9 +Subproject commit 0554c36883990b14e8dc9f49d1b27c1f65730c29 diff --git a/package.json b/package.json index dd16a220f..481844019 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-angular-fullstack", - "version": "4.0.0", + "version": "4.0.1", "description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node", "keywords": [ "yeoman-generator", From 44084f3bef68d29e9c05f3bc54206a4f28e30187 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Wed, 10 Aug 2016 16:51:58 +0200 Subject: [PATCH 048/104] chore(package): update should to version 11.0.0 (#2134) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 481844019..be470459c 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "recursive-readdir": "^2.0.0", "run-sequence": "^1.2.1", "shelljs": "^0.7.0", - "should": "^10.0.0", + "should": "^11.0.0", "yeoman-assert": "^2.0.0", "yeoman-test": "~1.4.0" }, From 4c12ecad493ee74e22c974ae7820497e267822ec Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 10 Aug 2016 16:36:52 -0400 Subject: [PATCH 049/104] docs(readme): add note about node-gyp [skip ci] --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index fbf6865cb..aca96f813 100644 --- a/readme.md +++ b/readme.md @@ -37,6 +37,7 @@ yo angular-fullstack * MongoDB - Download and Install [MongoDB](https://www.mongodb.com/download-center#community) - If you plan on scaffolding your project with mongoose, you'll need mongoDB to be installed and have the `mongod` process running. * The project's JavaScript is written in ECMAScript 2015. If you're unfamiliar with the latest changes to the specification for JavaScript, check out http://es6-features.org/ +* [`node-gyp`](https://github.com/nodejs/node-gyp) - You'll likely need to be able to use `node-gyp`, Node's tool for compiling native add-ons (for things like database drivers). See its [Installation section](https://github.com/nodejs/node-gyp#installation) for more instructions. ## Supported Configurations From f278ea58f91ced434c98d955f29a757357d273c9 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 11 Aug 2016 17:16:17 -0400 Subject: [PATCH 050/104] chore(package): bump ui-bootstrap to v2 (#2138) [skip ci] --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index c2da6a15d..a05e8cdb9 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -14,7 +14,7 @@ "angular-cookies": "~1.5.5", "angular-sanitize": "~1.5.5",<% if(filters.ngroute) { %> "angular-route": "~1.5.5",<% } if(filters.uibootstrap) { %> - "angular-ui-bootstrap": "~1.1.2",<% } %> + "angular-ui-bootstrap": "^2.0.1",<% } %> "font-awesome": ">=4.1.0",<% if(filters.socketio) { %> "angular-socket-io": "~0.7.0",<% } if(filters.uirouter) { %> "angular-ui-router": "~0.2.15",<% } if(filters.auth) { %> From a76034b5bc3c6c55dfcf24ec99e94c88230fa785 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 11 Aug 2016 17:17:32 -0400 Subject: [PATCH 051/104] chore(package): bump bootstrap to 3.3.7 --- templates/app/_package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index a05e8cdb9..603896f87 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -5,8 +5,8 @@ "dependencies": { <%# CLIENT %> "angular": "~1.5.5",<% if(filters.bootstrap) { if(filters.sass) { %> - "bootstrap-sass": "~3.1.1",<% } %> - "bootstrap": "~3.1.1",<% if(filters.oauth) { %> + "bootstrap-sass": "~3.3.7",<% } %> + "bootstrap": "~3.3.7",<% if(filters.oauth) { %> "bootstrap-social": "~4.9.1",<% }} %> "angular-animate": "~1.5.5", "angular-aria": "~1.5.5", From 1e25de70b2756ffcfe4efe6a469f978082261a67 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 11 Aug 2016 17:26:57 -0400 Subject: [PATCH 052/104] feat(gen:gulp): add TODO tasks in gulpfile. rm 2 old grunt tasks remove updateFixtures & installFixtures tasks from gruntfile since already ported to gulpfile [skip ci] --- Gruntfile.js | 43 ------------------------------------------- gulpfile.js | 10 ++++++++++ 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 37efd2c0d..d75515f33 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -261,49 +261,6 @@ module.exports = function (grunt) { } }); - grunt.registerTask('updateFixtures', 'updates package and bower fixtures', function(target) { - var genVer = require('./package.json').version; - var dest = __dirname + ((target === 'deps') ? '/angular-fullstack-deps/' : '/test/fixtures/'); - var appName = (target === 'deps') ? 'angular-fullstack-deps' : 'tempApp'; - - var processJson = function(s, d) { - // read file, strip all ejs conditionals, and parse as json - var json = JSON.parse(fs.readFileSync(path.resolve(s), 'utf8').replace(/<%(.*)%>/g, '')); - // set properties - json.name = appName, json.version = genVer; - if (target === 'deps') { json.private = false; } - // stringify json and write it to the destination - fs.writeFileSync(path.resolve(d), JSON.stringify(json, null, 2)); - }; - - processJson('templates/app/_package.json', dest + 'package.json'); - processJson('templates/app/_bower.json', dest + 'bower.json'); - }); - - grunt.registerTask('installFixtures', 'install package and bower fixtures', function() { - var done = this.async(); - - shell.cd('test/fixtures'); - grunt.log.ok('installing npm dependencies for generated app'); - child_process.exec('npm install --quiet', {cwd: '../fixtures'}, function (error, stdout, stderr) { - - grunt.log.ok('installing bower dependencies for generated app'); - child_process.exec('bower install', {cwd: '../fixtures'}, function (error, stdout, stderr) { - - if(!process.env.SAUCE_USERNAME) { - grunt.log.ok('running npm run-script update-webdriver'); - child_process.exec('npm run-script update-webdriver', function() { - shell.cd('../../'); - done(); - }); - } else { - shell.cd('../../'); - done(); - } - }) - }); - }); - grunt.registerTask('test', function(target, option) { if (target === 'fast') { grunt.task.run([ diff --git a/gulpfile.js b/gulpfile.js index 6d6752aeb..8a868ae0a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -168,3 +168,13 @@ gulp.task('test', () => { return gulp.src(['test/pre.test.js', 'test/*.test.js']) .pipe(mocha()); }); + +gulp.task('updateSubmodules', () => console.log('TODO')); +gulp.task('changelog', () => console.log('TODO')); +gulp.task('generateDemo', () => console.log('TODO')); +gulp.task('demo', () => console.log('TODO')); // ['clean:demo', 'generateDemo'] +gulp.task('releaseDemo', () => console.log('TODO')); //['demo', 'releaseDemoBuild', 'buildcontrol:release'] +gulp.task('releaseDemoBuild', () => console.log('TODO')); +gulp.task('deps', () => console.log('TODO')); // updateFixtures, david +gulp.task('release', () => console.log('TODO')); +gulp.task('lint', () => console.log('TODO')); From 3c20ff07031d0b838b6bf9d92217ccf08547a74a Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 11 Aug 2016 17:37:16 -0400 Subject: [PATCH 053/104] chore(package): update bootstrap-social to ^5.0.0 (#2139) [skip ci] --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index 603896f87..adf0f2009 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -7,7 +7,7 @@ "angular": "~1.5.5",<% if(filters.bootstrap) { if(filters.sass) { %> "bootstrap-sass": "~3.3.7",<% } %> "bootstrap": "~3.3.7",<% if(filters.oauth) { %> - "bootstrap-social": "~4.9.1",<% }} %> + "bootstrap-social": "^5.0.0",<% }} %> "angular-animate": "~1.5.5", "angular-aria": "~1.5.5", "angular-resource": "~1.5.5", From da3f054c9e10a88fac94d7227c91cda73c7a55c0 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 11 Aug 2016 17:40:40 -0400 Subject: [PATCH 054/104] chore(package): bump angular-validation-match to ^1.9.0 (#2140) [skip ci] --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index adf0f2009..02a442595 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -18,7 +18,7 @@ "font-awesome": ">=4.1.0",<% if(filters.socketio) { %> "angular-socket-io": "~0.7.0",<% } if(filters.uirouter) { %> "angular-ui-router": "~0.2.15",<% } if(filters.auth) { %> - "angular-validation-match": "~1.5.2",<% } %> + "angular-validation-match": "^1.9.0",<% } %> <%# END CLIENT %> "core-js": "^2.2.1", "express": "^4.13.3", From b9abc589bd1a52e3cdd7fc62b285428ec9662dc6 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 11 Aug 2016 20:01:13 -0400 Subject: [PATCH 055/104] fix(gulp:build): remove protractor typings (#2144) [skip ci] --- templates/app/typings(ts).json | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/app/typings(ts).json b/templates/app/typings(ts).json index 6ec1e1e7a..2f9798375 100644 --- a/templates/app/typings(ts).json +++ b/templates/app/typings(ts).json @@ -10,7 +10,6 @@ "webpack": "github:DefinitelyTyped/DefinitelyTyped/webpack/webpack.d.ts#95c02169ba8fa58ac1092422efbd2e3174a206f4" }, "ambientDevDependencies": { - "angular-protractor": "github:DefinitelyTyped/DefinitelyTyped/angular-protractor/angular-protractor.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", "selenium-webdriver": "github:DefinitelyTyped/DefinitelyTyped/selenium-webdriver/selenium-webdriver.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", <%_ if(filters.mocha) { _%> "mocha": "github:DefinitelyTyped/DefinitelyTyped/mocha/mocha.d.ts#40c60850ad6c8175a62d5ab48c4e016ea5b3dffe", From 82d4643911705c14d44e2a9b5a6e0e68497139af Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Fri, 12 Aug 2016 19:04:55 +0200 Subject: [PATCH 056/104] chore(package): update lodash to version 4.15.0 (#2147) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be470459c..47e2ffe3f 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "gulp-filter": "^4.0.0", "gulp-tap": "^0.1.3", "insight": "~0.8.3", - "lodash": "^4.14.1", + "lodash": "^4.15.0", "semver": "^5.1.0", "underscore.string": "^3.1.1", "yeoman-generator": "~0.24.1", From a9963b105a6e012708bc59f7bf1dc33345dbe166 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Fri, 12 Aug 2016 14:07:18 -0400 Subject: [PATCH 057/104] chore(package): bump ui-router to ~0.3.1 (#2141) [skip ci] --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index 02a442595..b7393c57a 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -17,7 +17,7 @@ "angular-ui-bootstrap": "^2.0.1",<% } %> "font-awesome": ">=4.1.0",<% if(filters.socketio) { %> "angular-socket-io": "~0.7.0",<% } if(filters.uirouter) { %> - "angular-ui-router": "~0.2.15",<% } if(filters.auth) { %> + "angular-ui-router": "~0.3.1",<% } if(filters.auth) { %> "angular-validation-match": "^1.9.0",<% } %> <%# END CLIENT %> "core-js": "^2.2.1", From 03ccf56b0f8681db5564d8f19c7a3eefe7375304 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Fri, 12 Aug 2016 14:07:47 -0400 Subject: [PATCH 058/104] chore(package): bump flow-bin to 0.30 (#2142) 0.30+ have Windows binaries [skip ci] --- templates/app/_package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index b7393c57a..6015c6696 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -70,7 +70,7 @@ "browser-sync": "^2.8.0", "bs-fullscreen-message": "^1.0.0", <%_ if(filters.flow) { -%> - "flow-bin": "^0.27.0", + "flow-bin": "^0.30.0", "babel-plugin-syntax-flow": "^6.8.0", "babel-plugin-transform-flow-comments": "^6.8.0",<% } %> "babel-plugin-transform-class-properties": "^6.6.0", From 86f98613c247b42cf8ac8db2b74e69274b655f7e Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Sun, 14 Aug 2016 15:23:44 +0200 Subject: [PATCH 059/104] chore(package): update should to version 11.1.0 (#2153) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 47e2ffe3f..cc8b510df 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "recursive-readdir": "^2.0.0", "run-sequence": "^1.2.1", "shelljs": "^0.7.0", - "should": "^11.0.0", + "should": "^11.1.0", "yeoman-assert": "^2.0.0", "yeoman-test": "~1.4.0" }, From f1e7a87d6530cc1a1acfd4dd8c0335e9dcd5c807 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 16 Aug 2016 02:40:32 -0400 Subject: [PATCH 060/104] feat(docs): add daux.io docs --- .gitignore | 3 +- daux/templates/content.php | 41 + daux/templates/error.php | 11 + daux/templates/home.php | 85 + daux/templates/layout/00_layout.php | 84 + daux/templates/layout/05_page.php | 108 + daux/templates/partials/google_analytics.php | 9 + daux/templates/partials/navbar_content.php | 11 + daux/templates/partials/piwik_analytics.php | 15 + .../01_Prerequisites.md} | 6 +- docs/01_Getting_Started/02_Installation.md | 0 .../03_Running_the_Generator.md | 0 .../01_Getting_Started/04_Project_Overview.md | 0 docs/Deployment/00_title.md | 1 + docs/Developing/00_title.md | 1 + docs/Examples/00_title.md | 1 + docs/angular-fullstack-logo.svg | 9045 +++++++++++++++++ docs/config.json | 34 + docs/generators/heroku.md | 44 +- docs/getting-started/step1-overview.md | 22 - docs/index.md | 26 +- gulpfile.js | 12 + package.json | 1 + readme.md | 4 +- 24 files changed, 9505 insertions(+), 59 deletions(-) create mode 100644 daux/templates/content.php create mode 100644 daux/templates/error.php create mode 100644 daux/templates/home.php create mode 100644 daux/templates/layout/00_layout.php create mode 100644 daux/templates/layout/05_page.php create mode 100644 daux/templates/partials/google_analytics.php create mode 100644 daux/templates/partials/navbar_content.php create mode 100644 daux/templates/partials/piwik_analytics.php rename docs/{getting-started/index.md => 01_Getting_Started/01_Prerequisites.md} (91%) create mode 100644 docs/01_Getting_Started/02_Installation.md create mode 100644 docs/01_Getting_Started/03_Running_the_Generator.md create mode 100644 docs/01_Getting_Started/04_Project_Overview.md create mode 100644 docs/Deployment/00_title.md create mode 100644 docs/Developing/00_title.md create mode 100644 docs/Examples/00_title.md create mode 100644 docs/angular-fullstack-logo.svg create mode 100644 docs/config.json delete mode 100644 docs/getting-started/step1-overview.md diff --git a/.gitignore b/.gitignore index 230257f1f..88c5c584e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ bower_components demo .idea .DS_Store -release.txt \ No newline at end of file +release.txt +static diff --git a/daux/templates/content.php b/daux/templates/content.php new file mode 100644 index 000000000..4a892507f --- /dev/null +++ b/daux/templates/content.php @@ -0,0 +1,41 @@ +layout('theme::layout/05_page') ?> +
+ + + + + + +
+ +
+ + + + +
+ diff --git a/daux/templates/error.php b/daux/templates/error.php new file mode 100644 index 000000000..c3ae7a5b2 --- /dev/null +++ b/daux/templates/error.php @@ -0,0 +1,11 @@ +layout('theme::layout/05_page') ?> + +
+ + +
+ +
+
diff --git a/daux/templates/home.php b/daux/templates/home.php new file mode 100644 index 000000000..873d2eabe --- /dev/null +++ b/daux/templates/home.php @@ -0,0 +1,85 @@ +layout('theme::layout/00_layout') ?> + + + + Fork me on GitHub + + +
+
+ ' . $params['tagline'] . ''; +} ?> +
+ +
+ '; +} ?> +
+ +
+
+ View On GitHub'; + } + foreach ($page['entry_page'] as $key => $node) { + echo '' . $key . ''; + } + ?> +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ + + + + + + +
+
+
+
diff --git a/daux/templates/layout/00_layout.php b/daux/templates/layout/00_layout.php new file mode 100644 index 000000000..8452b6b82 --- /dev/null +++ b/daux/templates/layout/00_layout.php @@ -0,0 +1,84 @@ + + + + + + + <?= $page['title']; ?> <?php if ($page['title'] != $params['title']) { + echo '- ' . $params['title']; +} ?> + + + + + + + + + + "; +} ?> + + + "; +} ?> + + + + + + + + + + section('content'); ?> + + insert('theme::partials/google_analytics', ['analytics' => $params['html']['google_analytics'], 'host' => array_key_exists('host', $params) ? $params['host'] : '']); + } + if ($params['html']['piwik_analytics']) { + $this->insert('theme::partials/piwik_analytics', ['url' => $params['html']['piwik_analytics'], 'id' => $params['html']['piwik_analytics_id']]); + } + ?> + + + + + + + + + + '; + } ?> + + + + + + + + + + + + diff --git a/daux/templates/layout/05_page.php b/daux/templates/layout/05_page.php new file mode 100644 index 000000000..0f6f70e74 --- /dev/null +++ b/daux/templates/layout/05_page.php @@ -0,0 +1,108 @@ +layout('theme::layout/00_layout') ?> + + + Fork me on GitHub + + + +
+
+
+ +
+ +
+ + value[$page['language']]; + $path = $page['language']; + } + + echo $this->get_navigation($rendertree, $path, isset($params['request']) ? $params['request'] : '', $base_page, $params['mode']); + ?> + + + +
+ + + +
+
+ +
+
+ section('content'); ?> +
+
+
+
diff --git a/daux/templates/partials/google_analytics.php b/daux/templates/partials/google_analytics.php new file mode 100644 index 000000000..2f6328b71 --- /dev/null +++ b/daux/templates/partials/google_analytics.php @@ -0,0 +1,9 @@ + diff --git a/daux/templates/partials/navbar_content.php b/daux/templates/partials/navbar_content.php new file mode 100644 index 000000000..92991af09 --- /dev/null +++ b/daux/templates/partials/navbar_content.php @@ -0,0 +1,11 @@ + + + + + diff --git a/daux/templates/partials/piwik_analytics.php b/daux/templates/partials/piwik_analytics.php new file mode 100644 index 000000000..32ddcacb3 --- /dev/null +++ b/daux/templates/partials/piwik_analytics.php @@ -0,0 +1,15 @@ + + diff --git a/docs/getting-started/index.md b/docs/01_Getting_Started/01_Prerequisites.md similarity index 91% rename from docs/getting-started/index.md rename to docs/01_Getting_Started/01_Prerequisites.md index 1c728659c..5814f61d3 100644 --- a/docs/getting-started/index.md +++ b/docs/01_Getting_Started/01_Prerequisites.md @@ -1,5 +1,3 @@ -# Getting Started - ## Prerequisites Make sure you have all the required dependencies available: @@ -16,12 +14,12 @@ your computer's startup. Example: ```bash #!/bin/bash -/var/lib/mongo/server/3.2/bin/mongod.exe --dbpath /data/db +/var/lib/mongo/server/3.2/bin/mongod --dbpath /data/db ``` Make a new directory, and `cd` into it: ```bash -mkdir afs && cd $_ +mkdir myapp && cd $_ ``` Run `yo angular-fullstack`, optionally passing an app name: diff --git a/docs/01_Getting_Started/02_Installation.md b/docs/01_Getting_Started/02_Installation.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/01_Getting_Started/03_Running_the_Generator.md b/docs/01_Getting_Started/03_Running_the_Generator.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/01_Getting_Started/04_Project_Overview.md b/docs/01_Getting_Started/04_Project_Overview.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/Deployment/00_title.md b/docs/Deployment/00_title.md new file mode 100644 index 000000000..18bc89112 --- /dev/null +++ b/docs/Deployment/00_title.md @@ -0,0 +1 @@ +[STUB] diff --git a/docs/Developing/00_title.md b/docs/Developing/00_title.md new file mode 100644 index 000000000..18bc89112 --- /dev/null +++ b/docs/Developing/00_title.md @@ -0,0 +1 @@ +[STUB] diff --git a/docs/Examples/00_title.md b/docs/Examples/00_title.md new file mode 100644 index 000000000..18bc89112 --- /dev/null +++ b/docs/Examples/00_title.md @@ -0,0 +1 @@ +[STUB] diff --git a/docs/angular-fullstack-logo.svg b/docs/angular-fullstack-logo.svg new file mode 100644 index 000000000..bf40810ac --- /dev/null +++ b/docs/angular-fullstack-logo.svg @@ -0,0 +1,9045 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/config.json b/docs/config.json new file mode 100644 index 000000000..1b1761576 --- /dev/null +++ b/docs/config.json @@ -0,0 +1,34 @@ +{ + "title": "Angular Full-Stack", + "tagline": "Yeoman generator for creating MEAN/SEAN stack applications, using ES6, MongoDB/SQL, Express, AngularJS, and Node - lets you quickly set up a project following best practices.", + "author": "Andrew Koroluk", + "image": "angular-fullstack-logo.svg", + "templates": "daux/templates", + "ignore": { + "files": ["Work_In_Progress.md"], + "folders": ["99_Not_Ready"] + }, + "live": { + "clean_urls": true + }, + "html": { + "theme": "daux-blue", + "breadcrumbs": true, + "breadcrumb_separator": "Chevrons", + "toggle_code": true, + "date_modified": true, + "float": false, + "inherit_index": true, + "search": true, + + "repo": "angular-fullstack/generator-angular-fullstack", + "google_analytics": "UA-48443700-5", + "links": { + "Download": "https://www.npmjs.com/package/generator-angular-fullstack", + "GitHub Repo": "https://github.com/angular-fullstack/generator-angular-fullstack", + "Help/Support/Bugs": "https://github.com/angular-fullstack/generator-angular-fullstack/issues", + "Our Gitter Chatroom": "https://gitter.im/angular-fullstack/generator-angular-fullstack", + "Support our Open Collective": "https://opencollective.com/angular-fullstack" + } + } +} \ No newline at end of file diff --git a/docs/generators/heroku.md b/docs/generators/heroku.md index 20336b82c..8024dd55b 100644 --- a/docs/generators/heroku.md +++ b/docs/generators/heroku.md @@ -2,24 +2,28 @@ Deploying to heroku only takes a few steps. - yo angular-fullstack:heroku +``` +yo angular-fullstack:heroku +``` To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder. If you're using mongoDB you will need to add a database to your app: - heroku addons:create mongolab +``` +heroku addons:create mongolab +``` Note: if you get an `Error: No valid replicaset instance servers found` you need to modify moongose connection options in config/environment/production.js as follows: ``` options: { - db: { - safe: true, - replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }, - server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } } - } - } + db: { + safe: true, + replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }, + server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } } + } +} ``` One of the odd things about the Node driver is that the default timeout for replica set connections is only 1 second, so make sure you're setting it to something more like 30s like in this example. @@ -29,24 +33,30 @@ Your app should now be live. To view it run `heroku open`. > > If you're using any oAuth strategies, you must set environment variables for your selected oAuth. For example, if we're using **Facebook** oAuth we would do this : > -> heroku config:set FACEBOOK_ID=id -> heroku config:set FACEBOOK_SECRET=secret +> ``` +> heroku config:set FACEBOOK_ID=id +> heroku config:set FACEBOOK_SECRET=secret +> ``` > > You will also need to set `DOMAIN` environment variable: > -> heroku config:set DOMAIN=.herokuapp.com -> -> # or (if you're using it): -> -> heroku config:set DOMAIN= +> ``` +> heroku config:set DOMAIN=.herokuapp.com +> # or (if you're using it): +> heroku config:set DOMAIN= +> ``` > To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control). #### Pushing Updates - gulp build +``` +gulp build +``` Commit and push the resulting build, located in your dist folder: - gulp buildcontrol:heroku +``` +gulp buildcontrol:heroku +``` diff --git a/docs/getting-started/step1-overview.md b/docs/getting-started/step1-overview.md deleted file mode 100644 index 5db41aec4..000000000 --- a/docs/getting-started/step1-overview.md +++ /dev/null @@ -1,22 +0,0 @@ -# Project Overview - -Now that you've got a Full-Stack Angular project scaffolded, lets go over how everything is structured. - -The first thing you should notice at the root of where you ran the generator is a `README.md` file. -Go ahead and listen to the angry filename and read it, then come back here. - -You should have everything you need installed now. Find the `package.json` file. -That file tells npm which dependencies to install, as well as a few other things about your app. - -Now find the `gulpfile.babel.js`. Pretty much everthing you do with your app from now on will have something to do with this file. -[Gulp](http://gulpjs.com/) is a task runner that runs on top of Node. It automates tasks such as compiling code, copying files, -running different test commands, running your server, building your code for distribution, and on and on. -Let's go over some of the most important Gulp tasks: - -* `gulp serve` - This will build the code for development use, run a dev server, and open up the application in your default browser. -* `gulp build` - This will build the code into the `dist/` folder, which you can then distribute to your production servers. -* `gulp test` - This will run client and server unit + integration tests. - -## Webpack - -Webpack is a module bundler for front-end web applications. Basically it takes all of your front-end files (JavaScript source + libs, CSS, HTML, etc) and bundles them all up into intelligently laid-out JavaScript bundles. It uses CommonJS to `import`/`export` modules/assets. The takeaway here is that instead of loading your JS files directly in the browser, instead you'll be loading the webpack bundles. Also, instead of everything naively using the global browser scope, you'll need to `import`/`export` anything you'd like to use. We'll look into this in greater detail later. diff --git a/docs/index.md b/docs/index.md index 3def90f9e..17afa0780 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,22 +5,22 @@ Available generators: * App - - [angular-fullstack](/docs/generators/app.md) (aka [angular-fullstack:app](/docs/generators/app.md)) + - [angular-fullstack](Generators/app.md) (aka [angular-fullstack:app](Generators/app.md)) * Server Side - - [angular-fullstack:endpoint](/docs/generators/endpoint.md) + - [angular-fullstack:endpoint](Generators/endpoint.md) * Client Side (via [generator-ng-component](https://github.com/DaftMonk/generator-ng-component)) - - [angular-fullstack:route](/docs/generators/route.md) - - [angular-fullstack:component](/docs/generators/component.md) - - [angular-fullstack:controller](/docs/generators/controller.md) - - [angular-fullstack:filter](/docs/generators/filter.md) - - [angular-fullstack:directive](/docs/generators/directive.md) - - [angular-fullstack:service](/docs/generators/service.md) - - [angular-fullstack:provider](/docs/generators/service.md) - - [angular-fullstack:factory](/docs/generators/service.md) - - [angular-fullstack:decorator](/docs/generators/decorator.md) + - [angular-fullstack:route](Generators/route.md) + - [angular-fullstack:component](Generators/component.md) + - [angular-fullstack:controller](Generators/controller.md) + - [angular-fullstack:filter](Generators/filter.md) + - [angular-fullstack:directive](Generators/directive.md) + - [angular-fullstack:service](Generators/service.md) + - [angular-fullstack:provider](Generators/service.md) + - [angular-fullstack:factory](Generators/service.md) + - [angular-fullstack:decorator](Generators/decorator.md) * Deployment - - [angular-fullstack:openshift](/docs/generators/openshift.md) - - [angular-fullstack:heroku](/docs/generators/heroku.md) + - [angular-fullstack:openshift](Generators/openshift.md) + - [angular-fullstack:heroku](Generators/heroku.md) ## Bower Components diff --git a/gulpfile.js b/gulpfile.js index 8a868ae0a..c2eb24a3b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -15,6 +15,7 @@ const lazypipe = require('lazypipe'); const runSequence = require('run-sequence'); const merge = require('merge-stream'); const shell = require('shelljs'); +const ghPages = require('gulp-gh-pages'); var watching = false; @@ -178,3 +179,14 @@ gulp.task('releaseDemoBuild', () => console.log('TODO')); gulp.task('deps', () => console.log('TODO')); // updateFixtures, david gulp.task('release', () => console.log('TODO')); gulp.task('lint', () => console.log('TODO')); + +gulp.task('daux', () => { + return execAsync('daux'); +}); +gulp.task('gh-pages', () => { + return gulp.src('./static/**/*') + .pipe(ghPages()); +}); +gulp.task('docs', cb => { + return runSequence('daux', 'gh-pages', cb); +}); diff --git a/package.json b/package.json index cc8b510df..7a4b84d63 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "grunt-mocha-test": "^0.12.7", "grunt-release": "^0.14.0", "gulp": "^3.9.1", + "gulp-gh-pages": "^0.5.4", "gulp-if": "^2.0.1", "gulp-mocha": "^3.0.0", "gulp-plumber": "^1.1.0", diff --git a/readme.md b/readme.md index aca96f813..888b946b8 100644 --- a/readme.md +++ b/readme.md @@ -31,7 +31,7 @@ Run `yo angular-fullstack` yo angular-fullstack ``` -**See the [Getting Started](/docs/getting-started/index.md) guide for more information.** +**See the [Getting Started](http://angular-fullstack.github.io/generator-angular-fullstack/Getting_Started/Prerequisites.html) guide for more information.** ## Prerequisites @@ -97,7 +97,7 @@ Available generators: ## Documentation -Check out our [documentation home page](/docs/index.md). +Check out our [documentation home page](http://angular-fullstack.github.io/generator-angular-fullstack). ## Contribute From 85921befa7a8635bccf7c428987f40bca472c82d Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 10:59:36 -0400 Subject: [PATCH 061/104] feat(gen:app): add eslint to the yo write stream with `fix` enabled. Should automatically get rid of a lot of ESLint issues. fixes #2157 --- package.json | 2 ++ src/generators/app/index.js | 12 ++++++++++++ templates/app/.eslintrc | 5 ++++- templates/app/client/app/app.js | 5 +---- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7a4b84d63..22376ab4d 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "prepublish": "gulp build" }, "dependencies": { + "babel-eslint": "^6.1.2", "babel-plugin-syntax-class-properties": "^6.5.0", "babel-plugin-syntax-flow": "^6.5.0", "babel-plugin-transform-flow-strip-types": "^6.7.0", @@ -44,6 +45,7 @@ "glob": "^7.0.5", "gulp-babel": "^6.1.2", "gulp-beautify": "^2.0.0", + "gulp-eslint": "^3.0.1", "gulp-filter": "^4.0.0", "gulp-tap": "^0.1.3", "insight": "~0.8.3", diff --git a/src/generators/app/index.js b/src/generators/app/index.js index ae48e4c82..4fa626937 100644 --- a/src/generators/app/index.js +++ b/src/generators/app/index.js @@ -13,6 +13,7 @@ import babelStream from 'gulp-babel'; import beaufityStream from 'gulp-beautify'; import tap from 'gulp-tap'; import filter from 'gulp-filter'; +import eslint from 'gulp-eslint'; import semver from 'semver'; export class Generator extends Base { @@ -485,6 +486,8 @@ export class Generator extends Base { babelPlugins.push('babel-plugin-transform-flow-strip-types'); } + const genDir = path.join(__dirname, '../../'); + let jsFilter = filter(['client/**/*.js'], {restore: true}); this.registerTransformStream([ jsFilter, @@ -523,6 +526,15 @@ export class Generator extends Base { "wrap_attributes_indent_size": 4, "end_with_newline": true }), + eslint({ + fix: true, + configFile: path.join(genDir, 'templates/app/.eslintrc'), + env: { + es6: true, + browser: true, + commonjs: true + } + }), jsFilter.restore ]); diff --git a/templates/app/.eslintrc b/templates/app/.eslintrc index ef5d7de07..93dbcc287 100644 --- a/templates/app/.eslintrc +++ b/templates/app/.eslintrc @@ -175,7 +175,10 @@ "new-parens": 2, //disallow the omission of parentheses when invoking a constructor with no arguments "newline-after-var": 0, //require or disallow an empty newline after variable declarations "newline-before-return": 0, //require newline before return statement - "newline-per-chained-call": 0, //enforce newline after each call when chaining the calls + "newline-per-chained-call": [ + "error", + {"ignoreChainWithDepth": 2} + ], //enforce newline after each call when chaining the calls "no-array-constructor": 2, //disallow use of the Array constructor "no-bitwise": 0, //disallow use of bitwise operators "no-continue": 0, //disallow use of the continue statement diff --git a/templates/app/client/app/app.js b/templates/app/client/app/app.js index 7ccaaf89c..2937399dd 100644 --- a/templates/app/client/app/app.js +++ b/templates/app/client/app/app.js @@ -14,7 +14,7 @@ import uiRouter from 'angular-ui-router';<% } %> import uiBootstrap from 'angular-ui-bootstrap';<% } %> // import ngMessages from 'angular-messages'; <%_ if(filters.auth) { _%> -//import ngValidationMatch from 'angular-validation-match';<% } %> +// import ngValidationMatch from 'angular-validation-match';<% } %> import {routeConfig} from './app.config'; @@ -35,7 +35,6 @@ import socket from '../components/socket/socket.service';<% } %> import './app.<%= styleExt %>'; angular.module('<%= scriptAppName %>', [ - // ngAnimate, ngCookies, ngResource, ngSanitize, @@ -47,9 +46,7 @@ angular.module('<%= scriptAppName %>', [ uiRouter,<% } _%> <%_ if(filters.uibootstrap) { %> uiBootstrap,<% } %> - // ngMessages, <%_ if(filters.auth) { %> - // ngValidationMatch, _Auth, account, admin,<% } _%> From c5ab4319088f5eadb30826e8e8924b09f05d5055 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 13:27:02 -0400 Subject: [PATCH 062/104] feat(gen:app): run eslint w/ fix on both client & server --- src/generators/app/index.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/generators/app/index.js b/src/generators/app/index.js index 4fa626937..d66e6f9c6 100644 --- a/src/generators/app/index.js +++ b/src/generators/app/index.js @@ -488,9 +488,9 @@ export class Generator extends Base { const genDir = path.join(__dirname, '../../'); - let jsFilter = filter(['client/**/*.js'], {restore: true}); + let clientJsFilter = filter(['client/**/*.js'], {restore: true}); this.registerTransformStream([ - jsFilter, + clientJsFilter, babelStream({ plugins: babelPlugins.map(require.resolve), /* Babel get's confused about these if you're using an `npm link`ed @@ -528,14 +528,9 @@ export class Generator extends Base { }), eslint({ fix: true, - configFile: path.join(genDir, 'templates/app/.eslintrc'), - env: { - es6: true, - browser: true, - commonjs: true - } + configFile: path.join(genDir, 'templates/app/client/.eslintrc(babel)') }), - jsFilter.restore + clientJsFilter.restore ]); /** @@ -575,6 +570,16 @@ export class Generator extends Base { ]); } + let serverJsFilter = filter(['server/**/*.js'], {restore: true}); + this.registerTransformStream([ + serverJsFilter, + eslint({ + fix: true, + configFile: path.join(genDir, 'templates/app/server/.eslintrc') + }), + serverJsFilter.restore + ]); + let self = this; this.sourceRoot(path.join(__dirname, '../../templates/app')); this.processDirectory('.', '.'); From 50230932b1b2294daabe0f36eaad44087ca5d5d0 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 13:27:58 -0400 Subject: [PATCH 063/104] refactor(app): fix eslint errors for default gen and a few warnings --- .../client/app/account(auth)/login/index.js | 1 + .../app/account(auth)/settings/index.js | 1 + .../client/app/account(auth)/signup/index.js | 2 +- .../account(auth)/signup/signup.controller.js | 2 ++ templates/app/client/app/admin(auth)/index.js | 1 + .../components/auth(auth)/auth.service.js | 5 ++-- .../components/auth(auth)/router.decorator.js | 1 - .../modal(uibootstrap)/modal.service.js | 7 +++-- .../mongoose-error.directive.js | 1 + .../components/navbar/navbar.component.js | 2 ++ .../components/oauth-buttons(oauth)/index.js | 1 + .../socket(socketio)/socket.service.js | 3 +- .../app/client/components/util/util.module.js | 1 + .../client/components/util/util.service.js | 1 + .../server/api/user(auth)/user.controller.js | 7 ++--- .../app/server/api/user(auth)/user.events.js | 14 ++++----- .../user(auth)/user.model(mongooseModels).js | 6 ++-- templates/app/server/app.js | 10 ++++--- .../app/server/auth(auth)/auth.service.js | 9 ++---- templates/app/server/auth(auth)/index.js | 2 -- templates/app/server/config/express.js | 24 +++++++-------- templates/app/server/config/seed(models).js | 30 +++++++++---------- .../app/server/config/socketio(socketio).js | 8 ++--- 23 files changed, 72 insertions(+), 67 deletions(-) diff --git a/templates/app/client/app/account(auth)/login/index.js b/templates/app/client/app/account(auth)/login/index.js index 187b43be5..ded119f9e 100644 --- a/templates/app/client/app/account(auth)/login/index.js +++ b/templates/app/client/app/account(auth)/login/index.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; import LoginController from './login.controller'; export default angular.module('<%= scriptAppName %>.login', []) diff --git a/templates/app/client/app/account(auth)/settings/index.js b/templates/app/client/app/account(auth)/settings/index.js index 823caa530..6b5eddabe 100644 --- a/templates/app/client/app/account(auth)/settings/index.js +++ b/templates/app/client/app/account(auth)/settings/index.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; import SettingsController from './settings.controller'; export default angular.module('<%= scriptAppName %>.settings', []) diff --git a/templates/app/client/app/account(auth)/signup/index.js b/templates/app/client/app/account(auth)/signup/index.js index 43b4842b7..b95da83e1 100644 --- a/templates/app/client/app/account(auth)/signup/index.js +++ b/templates/app/client/app/account(auth)/signup/index.js @@ -1,5 +1,5 @@ 'use strict'; - +import angular from 'angular'; import SignupController from './signup.controller'; export default angular.module('<%= scriptAppName %>.signup', []) diff --git a/templates/app/client/app/account(auth)/signup/signup.controller.js b/templates/app/client/app/account(auth)/signup/signup.controller.js index 196684c24..85e71d28f 100644 --- a/templates/app/client/app/account(auth)/signup/signup.controller.js +++ b/templates/app/client/app/account(auth)/signup/signup.controller.js @@ -1,5 +1,7 @@ 'use strict'; // @flow +import angular from 'angular'; + <%_ if(filters.flow) { -%> type User = { name: string; diff --git a/templates/app/client/app/admin(auth)/index.js b/templates/app/client/app/admin(auth)/index.js index d78165412..72422ea8f 100644 --- a/templates/app/client/app/admin(auth)/index.js +++ b/templates/app/client/app/admin(auth)/index.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; import routes from './admin.routes'; import AdminController from './admin.controller'; diff --git a/templates/app/client/components/auth(auth)/auth.service.js b/templates/app/client/components/auth(auth)/auth.service.js index 87a0adb2f..ac17e15ce 100644 --- a/templates/app/client/components/auth(auth)/auth.service.js +++ b/templates/app/client/components/auth(auth)/auth.service.js @@ -1,6 +1,6 @@ 'use strict'; // @flow -class User { +class _User { _id: string = ''; name: string = ''; email: string = ''; @@ -11,7 +11,7 @@ class User { export function AuthService($location, $http, $cookies, $q, appConfig, Util, User) { 'ngInject'; var safeCb = Util.safeCb; - var currentUser: User = new User(); + var currentUser: _User = new _User(); var userRoles = appConfig.userRoles || []; /** * Check if userRole is >= role @@ -27,7 +27,6 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use } var Auth = { - /** * Authenticate user and save token * diff --git a/templates/app/client/components/auth(auth)/router.decorator.js b/templates/app/client/components/auth(auth)/router.decorator.js index ea205ec7d..aaff3be32 100644 --- a/templates/app/client/components/auth(auth)/router.decorator.js +++ b/templates/app/client/components/auth(auth)/router.decorator.js @@ -1,5 +1,4 @@ 'use strict'; -import * as _ from 'lodash'; export function routerDecorator($rootScope<% if(filters.ngroute) { %>, $location<% } if(filters.uirouter) { %>, $state<% } %>, Auth) { 'ngInject'; diff --git a/templates/app/client/components/modal(uibootstrap)/modal.service.js b/templates/app/client/components/modal(uibootstrap)/modal.service.js index 91d94894c..1269ac83b 100644 --- a/templates/app/client/components/modal(uibootstrap)/modal.service.js +++ b/templates/app/client/components/modal(uibootstrap)/modal.service.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; export function Modal($rootScope, $uibModal) { /** @@ -37,9 +38,9 @@ export function Modal($rootScope, $uibModal) { * @param {All} - any additional args are passed straight to del callback */ return function() { - var args = Array.prototype.slice.call(arguments), - name = args.shift(), - deleteModal; + var args = Array.prototype.slice.call(arguments); + var name = args.shift(); + var deleteModal; deleteModal = openModal({ modal: { diff --git a/templates/app/client/components/mongoose-error(auth)/mongoose-error.directive.js b/templates/app/client/components/mongoose-error(auth)/mongoose-error.directive.js index 3ee88f8d9..6405202a5 100644 --- a/templates/app/client/components/mongoose-error(auth)/mongoose-error.directive.js +++ b/templates/app/client/components/mongoose-error(auth)/mongoose-error.directive.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; /** * Removes server error when user updates input diff --git a/templates/app/client/components/navbar/navbar.component.js b/templates/app/client/components/navbar/navbar.component.js index 6a6d37282..8cf2ab0b1 100644 --- a/templates/app/client/components/navbar/navbar.component.js +++ b/templates/app/client/components/navbar/navbar.component.js @@ -1,4 +1,6 @@ 'use strict'; +/* eslint no-sync: 0 */ +import angular from 'angular'; export class NavbarComponent { menu = [{ diff --git a/templates/app/client/components/oauth-buttons(oauth)/index.js b/templates/app/client/components/oauth-buttons(oauth)/index.js index 8ce33c85e..bfa3b6ec0 100644 --- a/templates/app/client/components/oauth-buttons(oauth)/index.js +++ b/templates/app/client/components/oauth-buttons(oauth)/index.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; export function OauthButtonsController($window) { this.loginOauth = function(provider) { diff --git a/templates/app/client/components/socket(socketio)/socket.service.js b/templates/app/client/components/socket(socketio)/socket.service.js index bcaa55b18..dda994b83 100644 --- a/templates/app/client/components/socket(socketio)/socket.service.js +++ b/templates/app/client/components/socket(socketio)/socket.service.js @@ -1,5 +1,6 @@ 'use strict'; - +import _ from 'lodash'; +import angular from 'angular'; import io from 'socket.io-client'; function Socket(socketFactory) { diff --git a/templates/app/client/components/util/util.module.js b/templates/app/client/components/util/util.module.js index 3e93a69b9..b627e4486 100644 --- a/templates/app/client/components/util/util.module.js +++ b/templates/app/client/components/util/util.module.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; import {UtilService} from './util.service'; export default angular.module('<%= scriptAppName %>.util', []) diff --git a/templates/app/client/components/util/util.service.js b/templates/app/client/components/util/util.service.js index 39b108988..7101c92f8 100644 --- a/templates/app/client/components/util/util.service.js +++ b/templates/app/client/components/util/util.service.js @@ -1,4 +1,5 @@ 'use strict'; +import angular from 'angular'; /** * The Util service is for thin, globally reusable, utility functions diff --git a/templates/app/server/api/user(auth)/user.controller.js b/templates/app/server/api/user(auth)/user.controller.js index c3e0d50ed..d8a1f5fe3 100644 --- a/templates/app/server/api/user(auth)/user.controller.js +++ b/templates/app/server/api/user(auth)/user.controller.js @@ -2,7 +2,6 @@ <% if (filters.mongooseModels) { %> import User from './user.model';<% } %><% if (filters.sequelizeModels) { %> import {User} from '../../sqldb';<% } %> -import passport from 'passport'; import config from '../../config/environment'; import jwt from 'jsonwebtoken'; @@ -44,7 +43,7 @@ export function index(req, res) { /** * Creates a new user */ -export function create(req, res, next) { +export function create(req, res) { <% if (filters.mongooseModels) { %>var newUser = new User(req.body); newUser.provider = 'local'; newUser.role = 'user'; @@ -99,7 +98,7 @@ export function destroy(req, res) { /** * Change a users password */ -export function changePassword(req, res, next) { +export function changePassword(req, res) { var userId = req.user._id; var oldPass = String(req.body.oldPassword); var newPass = String(req.body.newPassword); @@ -155,6 +154,6 @@ export function me(req, res, next) { /** * Authentication callback */ -export function authCallback(req, res, next) { +export function authCallback(req, res) { res.redirect('/'); } diff --git a/templates/app/server/api/user(auth)/user.events.js b/templates/app/server/api/user(auth)/user.events.js index 1cd0480e5..f8ebebe90 100644 --- a/templates/app/server/api/user(auth)/user.events.js +++ b/templates/app/server/api/user(auth)/user.events.js @@ -14,18 +14,18 @@ UserEvents.setMaxListeners(0); // Model events<% if (filters.mongooseModels) { %> var events = { - 'save': 'save', - 'remove': 'remove' + save: 'save', + remove: 'remove' };<% } if (filters.sequelizeModels) { %> var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' + afterCreate: 'save', + afterUpdate: 'save', + afterDestroy: 'remove' };<% } %> // Register the event emitter to the model events -for (var e in events) { - var event = events[e];<% if (filters.mongooseModels) { %> +for(var e in events) { + let event = events[e];<% if (filters.mongooseModels) { %> User.schema.post(e, emitEvent(event));<% } if (filters.sequelizeModels) { %> User.hook(e, emitEvent(event));<% } %> } diff --git a/templates/app/server/api/user(auth)/user.model(mongooseModels).js b/templates/app/server/api/user(auth)/user.model(mongooseModels).js index c67632162..f23208f12 100644 --- a/templates/app/server/api/user(auth)/user.model(mongooseModels).js +++ b/templates/app/server/api/user(auth)/user.model(mongooseModels).js @@ -244,14 +244,14 @@ UserSchema.methods = { if(!callback) { return crypto.pbkdf2Sync(password, salt, defaultIterations, defaultKeyLength) - .toString('base64'); + .toString('base64'); } return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength, (err, key) => { if(err) { - callback(err); + return callback(err); } else { - callback(null, key.toString('base64')); + return callback(null, key.toString('base64')); } }); } diff --git a/templates/app/server/app.js b/templates/app/server/app.js index a63b97cab..7dbbcba9f 100644 --- a/templates/app/server/app.js +++ b/templates/app/server/app.js @@ -15,11 +15,13 @@ import http from 'http'; mongoose.connect(config.mongo.uri, config.mongo.options); mongoose.connection.on('error', function(err) { console.error('MongoDB connection error: ' + err); - process.exit(-1); + process.exit(-1); // eslint-disable-line no-process-exit }); -<% } %><% if (filters.models) { %> +<% } %><% if(filters.models) { %> // Populate databases with sample data -if (config.seedDB) { require('./config/seed'); } +if(config.seedDB) { + require('./config/seed'); +} <% } %> // Setup server var app = express(); @@ -38,7 +40,7 @@ function startServer() { console.log('Express server listening on %d, in %s mode', config.port, app.get('env')); }); } -<% if (filters.sequelize) { %> +<% if(filters.sequelize) { %> sqldb.sequelize.sync() .then(startServer) .catch(function(err) { diff --git a/templates/app/server/auth(auth)/auth.service.js b/templates/app/server/auth(auth)/auth.service.js index 43de0a3c5..13b345c3b 100644 --- a/templates/app/server/auth(auth)/auth.service.js +++ b/templates/app/server/auth(auth)/auth.service.js @@ -1,6 +1,4 @@ 'use strict'; - -import passport from 'passport'; import config from '../config/environment'; import jwt from 'jsonwebtoken'; import expressJwt from 'express-jwt'; @@ -60,11 +58,10 @@ export function hasRole(roleRequired) { return compose() .use(isAuthenticated()) .use(function meetsRequirements(req, res, next) { - if (config.userRoles.indexOf(req.user.role) >= - config.userRoles.indexOf(roleRequired)) { - next(); + if (config.userRoles.indexOf(req.user.role) >= config.userRoles.indexOf(roleRequired)) { + return next(); } else { - res.status(403).send('Forbidden'); + return res.status(403).send('Forbidden'); } }); } diff --git a/templates/app/server/auth(auth)/index.js b/templates/app/server/auth(auth)/index.js index 09564fe28..3f9983fb3 100644 --- a/templates/app/server/auth(auth)/index.js +++ b/templates/app/server/auth(auth)/index.js @@ -1,7 +1,5 @@ 'use strict'; - import express from 'express'; -import passport from 'passport'; import config from '../config/environment';<% if (filters.mongooseModels) { %> import User from '../api/user/user.model';<% } %><% if (filters.sequelizeModels) { %> import {User} from '../sqldb';<% } %> diff --git a/templates/app/server/config/express.js b/templates/app/server/config/express.js index d0cc7b99a..f80dc5a73 100644 --- a/templates/app/server/config/express.js +++ b/templates/app/server/config/express.js @@ -15,9 +15,9 @@ import errorHandler from 'errorhandler'; import path from 'path'; <%_ if(!filters.noModels) { -%> import lusca from 'lusca';<% } %> -import config from './environment';<% if (filters.auth) { %> +import config from './environment';<% if(filters.auth) { %> import passport from 'passport';<% } %><% if(!filters.noModels) { %> -import session from 'express-session';<% } %><% if (filters.mongoose) { %> +import session from 'express-session';<% } %><% if(filters.mongoose) { %> <%_ if(semver.satisfies(nodeVersion, '>= 4')) { _%> import connectMongo from 'connect-mongo';<% } else { _%> import connectMongo from 'connect-mongo/es5';<% } %> @@ -30,11 +30,11 @@ var Store = expressSequelizeSession(session.Store);<% } %> export default function(app) { var env = app.get('env'); - if (env === 'development' || env === 'test') { + if(env === 'development' || env === 'test') { app.use(express.static(path.join(config.root, '.tmp'))); } - if (env === 'production') { + if(env === 'production') { app.use(favicon(path.join(config.root, 'client', 'favicon.ico'))); } @@ -42,15 +42,15 @@ export default function(app) { app.use(express.static(app.get('appPath'))); app.use(morgan('dev')); - app.set('views', config.root + '/server/views');<% if (filters.html) { %> + app.set('views', config.root + '/server/views');<% if(filters.html) { %> app.engine('html', require('ejs').renderFile); - app.set('view engine', 'html');<% } %><% if (filters.pug) { %> + app.set('view engine', 'html');<% } %><% if(filters.pug) { %> app.set('view engine', 'pug');<% } %> app.use(shrinkRay()); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.use(methodOverride()); - app.use(cookieParser());<% if (filters.auth) { %> + app.use(cookieParser());<% if(filters.auth) { %> app.use(passport.initialize());<% } %> <% if(!filters.noModels) { %> @@ -60,7 +60,7 @@ export default function(app) { app.use(session({ secret: config.secrets.session, saveUninitialized: true, - resave: false<% if (filters.mongoose) { %>, + resave: false<% if(filters.mongoose) { %>, store: new MongoStore({ mongooseConnection: mongoose.connection, db: '<%= lodash.slugify(lodash.humanize(appname)) %>' @@ -72,7 +72,7 @@ export default function(app) { * Lusca - express server security * https://github.com/krakenjs/lusca */ - if (env !== 'test' && !process.env.SAUCE_USERNAME) { + if(env !== 'test' && !process.env.SAUCE_USERNAME) { app.use(lusca({ csrf: { angular: true @@ -87,7 +87,7 @@ export default function(app) { })); }<% } %> - if ('development' === env) { + if(env === 'development') { const webpackDevMiddleware = require('webpack-dev-middleware'); const stripAnsi = require('strip-ansi'); const webpack = require('webpack'); @@ -124,7 +124,7 @@ export default function(app) { */ compiler.plugin('done', function (stats) { console.log('webpack done hook'); - if (stats.hasErrors() || stats.hasWarnings()) { + if(stats.hasErrors() || stats.hasWarnings()) { return browserSync.sockets.emit('fullscreen:message', { title: "Webpack Error:", body: stripAnsi(stats.toString()), @@ -135,7 +135,7 @@ export default function(app) { }); } - if ('development' === env || 'test' === env) { + if(env === 'development' || env === 'test') { app.use(errorHandler()); // Error handler - has to be last } } diff --git a/templates/app/server/config/seed(models).js b/templates/app/server/config/seed(models).js index 07d9d52b8..627aa5a36 100644 --- a/templates/app/server/config/seed(models).js +++ b/templates/app/server/config/seed(models).js @@ -19,31 +19,31 @@ var User = sqldb.User;<% } %><% } %> <% if (filters.mongooseModels) { %>Thing.create({<% } if (filters.sequelizeModels) { %>Thing.bulkCreate([{<% } %> name: 'Development Tools', - info: 'Integration with popular tools such as Webpack, Gulp, Babel, TypeScript, Karma, ' + - 'Mocha, ESLint, Node Inspector, Livereload, Protractor, Pug, ' + - 'Stylus, Sass, and Less.' + info: 'Integration with popular tools such as Webpack, Gulp, Babel, TypeScript, Karma, ' + + 'Mocha, ESLint, Node Inspector, Livereload, Protractor, Pug, ' + + 'Stylus, Sass, and Less.' }, { name: 'Server and Client integration', - info: 'Built with a powerful and fun stack: MongoDB, Express, ' + - 'AngularJS, and Node.' + info: 'Built with a powerful and fun stack: MongoDB, Express, ' + + 'AngularJS, and Node.' }, { name: 'Smart Build System', - info: 'Build system ignores `spec` files, allowing you to keep ' + - 'tests alongside code. Automatic injection of scripts and ' + - 'styles into your index.html' + info: 'Build system ignores `spec` files, allowing you to keep ' + + 'tests alongside code. Automatic injection of scripts and ' + + 'styles into your index.html' }, { name: 'Modular Structure', - info: 'Best practice client and server structures allow for more ' + - 'code reusability and maximum scalability' + info: 'Best practice client and server structures allow for more ' + + 'code reusability and maximum scalability' }, { name: 'Optimized Build', - info: 'Build process packs up your templates as a single JavaScript ' + - 'payload, minifies your scripts/css/images, and rewrites asset ' + - 'names for caching.' + info: 'Build process packs up your templates as a single JavaScript ' + + 'payload, minifies your scripts/css/images, and rewrites asset ' + + 'names for caching.' }, { name: 'Deployment Ready', - info: 'Easily deploy your app to Heroku or Openshift with the heroku ' + - 'and openshift subgenerators' + info: 'Easily deploy your app to Heroku or Openshift with the heroku ' + + 'and openshift subgenerators' <% if (filters.mongooseModels) { %>});<% } if (filters.sequelizeModels) { %>}]);<% } %> }); diff --git a/templates/app/server/config/socketio(socketio).js b/templates/app/server/config/socketio(socketio).js index db5730912..367677f82 100644 --- a/templates/app/server/config/socketio(socketio).js +++ b/templates/app/server/config/socketio(socketio).js @@ -3,11 +3,10 @@ */ 'use strict'; -import config from './environment'; +// import config from './environment'; // When the user disconnects.. perform this -function onDisconnect(socket) { -} +function onDisconnect(/*socket*/) {} // When the user connects.. perform this function onConnect(socket) { @@ -37,8 +36,7 @@ export default function(socketio) { // })); socketio.on('connection', function(socket) { - socket.address = socket.request.connection.remoteAddress + - ':' + socket.request.connection.remotePort; + socket.address = `${socket.request.connection.remoteAddress}:${socket.request.connection.remotePort}`; socket.connectedAt = new Date(); From 331fb3dcf2ec7eb040fc4fd7ce124e2e09afb6a9 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 13:50:36 -0400 Subject: [PATCH 064/104] docs(examples): add Modal.md [skip ci] --- docs/Examples/Modal.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/Examples/Modal.md diff --git a/docs/Examples/Modal.md b/docs/Examples/Modal.md new file mode 100644 index 000000000..7f7b37f8d --- /dev/null +++ b/docs/Examples/Modal.md @@ -0,0 +1 @@ +[stub] From c606b7b54a32cce4503e86dac66558f02b570478 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 15:36:18 -0400 Subject: [PATCH 065/104] docs(index): update root doc for 4.0.0 [skip ci] --- docs/index.md | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/docs/index.md b/docs/index.md index 17afa0780..53ede32c5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -23,42 +23,9 @@ Available generators: - [angular-fullstack:heroku](Generators/heroku.md) -## Bower Components - -The following packages are always installed by the [app](#app) generator: - -* angular -* angular-cookies -* angular-mocks -* angular-resource -* angular-sanitize -* es5-shim -* font-awesome -* json3 -* jquery -* lodash - -These packages are installed optionally depending on your configuration: - -* angular-route -* angular-ui-router -* angular-socket-io -* angular-bootstrap -* bootstrap - -All of these can be updated with `bower update` as new versions are released. - ## Injection -A gulp task looks for new files in your `client/app` and `client/components` folder and automatically injects them in the appropriate places based on an injection block. - -* `less` files into `client/app/app.less` -* `scss` files into `client/app/app.scss` -* `stylus` files into `client/app/app.styl` -* `css` files into `client/index.html` -* `js` files into `client/index.html` -* `babel`/`typescript` temp `js` files into `client/index.html` -* `typescript types` into `tsconfig.client.json` & `tsconfig.client.test.json` +A gulp task looks for new SCSS/LESS/Stylus files in your `client/app` and `client/components` folder and automatically injects them into the main style file (ex `client/app/app.scss`) based on an injection block. ## Configuration From 41724a408e90e895c33c736cd04f3e54e79373b9 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 15:43:34 -0400 Subject: [PATCH 066/104] ci(circle): try adding docs deployment to circle config --- circle.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/circle.yml b/circle.yml index 66ef8cbae..0300b9f16 100644 --- a/circle.yml +++ b/circle.yml @@ -28,6 +28,13 @@ notify: # A list of hook hashes, containing the url field # gitter hook - url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789 + +deployment: + docs: + branch: master + commands: + - composer global require justinwalsh/daux.io + - gulp docs #test: # pre: From 34457bb623d8ebcb28d58ea8ad657beb2b710698 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 17 Aug 2016 16:37:25 -0400 Subject: [PATCH 067/104] docs(readme): strikethough systemjs + jspm make it more obvious that it's not a configuration, but might be in the future [skip ci] --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 888b946b8..3cbffb17a 100644 --- a/readme.md +++ b/readme.md @@ -54,7 +54,7 @@ yo angular-fullstack **Client** * Scripts: `JavaScript (Babel)`, `TypeScript` -* Module Systems: `Webpack`, `SystemJS + JSPM` (maybe) +* Module Systems: `Webpack`, ~~`SystemJS + JSPM`~~ (maybe) * Markup: `HTML`, `Pug` * Stylesheets: `CSS`, `Stylus`, `Sass`, `Less` * Angular Routers: `ngRoute`, `ui-router` From 231e500ecb7bc2f247291155ec6ab2a566a2b890 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 18 Aug 2016 10:30:26 -0400 Subject: [PATCH 068/104] fix(client:socket.service): import lodash named exports --- .../app/client/components/socket(socketio)/socket.service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/client/components/socket(socketio)/socket.service.js b/templates/app/client/components/socket(socketio)/socket.service.js index dda994b83..3e9dec2fd 100644 --- a/templates/app/client/components/socket(socketio)/socket.service.js +++ b/templates/app/client/components/socket(socketio)/socket.service.js @@ -1,5 +1,5 @@ 'use strict'; -import _ from 'lodash'; +import * as _ from 'lodash'; import angular from 'angular'; import io from 'socket.io-client'; From d6fc5f279e5df01cdf72bfdb23911ca09712777b Mon Sep 17 00:00:00 2001 From: Josh Lavely Date: Thu, 18 Aug 2016 23:41:54 -0400 Subject: [PATCH 069/104] docs(examples): add IIS.md --- docs/Examples/IIS.md | 136 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 docs/Examples/IIS.md diff --git a/docs/Examples/IIS.md b/docs/Examples/IIS.md new file mode 100644 index 000000000..e0fb56c1b --- /dev/null +++ b/docs/Examples/IIS.md @@ -0,0 +1,136 @@ + +![Yeoman / Windows/ MEAN](http://joshlavely.com/images/yo_windows_mean.gif) +# Angular-Generator-Fullstack on Windows +This is a walk through to get generator-angular-fullstack up and running on a windows machine. +This walk through has been tested on: + - Windows Vista + - Windows 7 + - Windows 8 + - Windows Server 2008 (*all builds/ updates*) + - Windows Server 2012 (*all builds/ updates*) + +## Prerequisites + +**Install Python** + - Download 2.7 from + - Install to C:\Python27 (*The Default Path*) ** + - After Python is installed add the %Path% (*C:\Python27\python.exe*) to your Windows Path Env variable. + - Start > Type ```Environment Variables``` > click "Edit the System Environment Variables" > Envrionment Variables > + Click "Path" > "Edit" + - Add C:\Python27\python.exe to the very end. (*Click into box and press 'End'*) + +**Install NodeJS on Windows** + - Download the latest stable release of NodeJS from https://nodejs.org and install using all the default options. + +**Install IISNode** + - Install Latest Stable release of [IISNode](https://github.com/tjanczuk/iisnode) + +**Install IIS URL-Rewrite Module** + - Install the [URL-Rewrite Module](http://www.iis.net/downloads/microsoft/url-rewrite) extension + +**Install MongoDB on Windows** + - Download the current stable release of MongoDB from https://www.mongodb.org/downloads and install using the "Complete" setup type and all the default options. + - Create the MongoDB data directory + - Create an empty folder at "C:\data\db". + - MongoDB requires a directory for storing all of it's data, the default directory is "C:\data\db", you can use a different directory if you prefer by specifying the "--dbpath" parameter when starting the MongoDB server (below). + - Start MongoDB Server on Windows + - Start the MongoDB server by running "mongod.exe" from the command line, "mongod.exe" is located in "C:\Program Files\MongoDB\Server\[MONGODB VERSION]\bin", for example for version 3.2 the following command will start MongoDB +``"C:\Program Files\MongoDB\Server\3.2\bin\mongod"`` + +## Getting your project started + +**Install the generator** + - Create an empty folder for your project + - Open CMD as administrator and change directories to your app's directory ```cd c:\example``` + - Run ```npm install -g yo gulp-cli generator-angular-fullstack``` + +## Move App into production +The below steps assume you have purchased a domain and have pointed your DNS to your public IP + +**Build and prep** + - Run the build process ```gulp serve:dist``` + - Move your *dist* folder to your desired directory (*This is where IIS will be pointed at*) + - Copy the contents of the 'server' folder **into** your 'client' folder + - Copy down the web.config from below and place this inside your 'client' folder (*save it as 'web.config'*) + + ``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` + + + **Setup IIS** + - Open IIS Manager (*Start > Type 'IIS Manager'*) + - Create your new site (*Expand Server > Right click sites > 'Add Websites'*) + - Enter your site's name + - Enter the directory path to your 'client' folder (*C:\example\dist\client\*) + - Enter your hostname (*Your a-record*) + - Leave all other defaults and click 'Ok' + +**Start your server** + - Run ```gulp serve:dist``` +# Congratulations, you did it! Now go code something awesome! + + From fb3859460e0f95fd41e431e6d58d3e661c5eb482 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sat, 20 Aug 2016 18:06:33 -0400 Subject: [PATCH 070/104] ci(circle): ignore gh-pages --- circle.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/circle.yml b/circle.yml index 0300b9f16..4e232c172 100644 --- a/circle.yml +++ b/circle.yml @@ -1,3 +1,8 @@ +general: + branches: + ignore: + - gh-pages + ## Customize the test machine machine: node: From 01418c56bd2705d86d85cf35a0ae7f506c407e8f Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sat, 20 Aug 2016 18:06:51 -0400 Subject: [PATCH 071/104] docs(examples): add heroku deployment --- docs/Examples/Heroku_Deployment.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/Examples/Heroku_Deployment.md diff --git a/docs/Examples/Heroku_Deployment.md b/docs/Examples/Heroku_Deployment.md new file mode 100644 index 000000000..2d7cda3b7 --- /dev/null +++ b/docs/Examples/Heroku_Deployment.md @@ -0,0 +1,11 @@ +After you have generated the app, go to heroku.com and create and application manually (ex. foo-bar-42424). Then, starting frome the root folder, run the following commands: + +* `grunt build` +* `cd dist +* `heroku login` (if you are not already authenticated) +* `heroku git:remote -a foo-bar-42424` +* `cd ..` +* `grunt build` (not sure if this one is necessary) +* `grunt buildcontrol:heroku` + +-- [@flaurian](https://github.com/flaurian) via [#1966](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1966#issuecomment-231297368) From ae4b3ce135b43a3bfec9551032129454d58825c8 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Sat, 20 Aug 2016 18:18:41 -0400 Subject: [PATCH 072/104] clean up #2160 --- docs/Examples/IIS.md | 58 +++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/docs/Examples/IIS.md b/docs/Examples/IIS.md index e0fb56c1b..2bc3d9975 100644 --- a/docs/Examples/IIS.md +++ b/docs/Examples/IIS.md @@ -1,6 +1,4 @@ - -![Yeoman / Windows/ MEAN](http://joshlavely.com/images/yo_windows_mean.gif) -# Angular-Generator-Fullstack on Windows +# Angular Full-Stack Generator deployment on Windows This is a walk through to get generator-angular-fullstack up and running on a windows machine. This walk through has been tested on: - Windows Vista @@ -12,16 +10,17 @@ This walk through has been tested on: ## Prerequisites **Install Python** - - Download 2.7 from - - Install to C:\Python27 (*The Default Path*) ** - - After Python is installed add the %Path% (*C:\Python27\python.exe*) to your Windows Path Env variable. - - Start > Type ```Environment Variables``` > click "Edit the System Environment Variables" > Envrionment Variables > - Click "Path" > "Edit" + - Download Python 2.7 from [python.org/downloads](https://www.python.org/downloads/) + - Install to `C:\Python27` (*The Default Path*) ** + - After Python is installed add the path (*`C:\Python27\`*) to your Windows `PATH` environment variable. + - Start > Type `Environment Variables` > click "Edit the System Environment Variables" > Envrionment Variables > Click "Path" > "Edit" - Add C:\Python27\python.exe to the very end. (*Click into box and press 'End'*) - + **Install NodeJS on Windows** - - Download the latest stable release of NodeJS from https://nodejs.org and install using all the default options. - + - Download & Install [nvm-windows](https://github.com/coreybutler/nvm-windows/releases). + - Run `nvm install 6.4.0` for the version of node that you want + - Run `nvm use 6.4.0` to use that version + **Install IISNode** - Install Latest Stable release of [IISNode](https://github.com/tjanczuk/iisnode) @@ -31,29 +30,28 @@ This walk through has been tested on: **Install MongoDB on Windows** - Download the current stable release of MongoDB from https://www.mongodb.org/downloads and install using the "Complete" setup type and all the default options. - Create the MongoDB data directory - - Create an empty folder at "C:\data\db". - - MongoDB requires a directory for storing all of it's data, the default directory is "C:\data\db", you can use a different directory if you prefer by specifying the "--dbpath" parameter when starting the MongoDB server (below). - - Start MongoDB Server on Windows - - Start the MongoDB server by running "mongod.exe" from the command line, "mongod.exe" is located in "C:\Program Files\MongoDB\Server\[MONGODB VERSION]\bin", for example for version 3.2 the following command will start MongoDB -``"C:\Program Files\MongoDB\Server\3.2\bin\mongod"`` + - Create an empty folder at ex. `C:\data\db`. + - MongoDB requires a directory for storing all of it's data. The default directory is `C:\data\db`. You can use a different directory if you prefer by specifying the "--dbpath" parameter when starting the MongoDB server (below). + - Start the MongoDB server daemon by running `mongod.exe` from the command line. `mongod.exe` is likely located in `C:\Program Files\MongoDB\Server\[MONGODB VERSION]\bin`; for example for version 3.2 the following command will start MongoDB: `C:\Program Files\MongoDB\Server\3.2\bin\mongod` ## Getting your project started **Install the generator** - Create an empty folder for your project - - Open CMD as administrator and change directories to your app's directory ```cd c:\example``` - - Run ```npm install -g yo gulp-cli generator-angular-fullstack``` + - Open a terminal and change directories to your app's directory `cd c:\example` + - Run `npm install -g yo gulp-cli generator-angular-fullstack` + - Run `yo angular-fullstack` ## Move App into production The below steps assume you have purchased a domain and have pointed your DNS to your public IP **Build and prep** - - Run the build process ```gulp serve:dist``` - - Move your *dist* folder to your desired directory (*This is where IIS will be pointed at*) - - Copy the contents of the 'server' folder **into** your 'client' folder + - Run the build process `gulp serve:dist` + - Move your `dist/` folder to your desired directory (*This is where IIS will be pointed at*) + - Copy the contents of the `server/` folder **into** your `client/` folder - Copy down the web.config from below and place this inside your 'client' folder (*save it as 'web.config'*) - - ``` + +``` @@ -118,19 +116,17 @@ The below steps assume you have purchased a domain and have pointed your DNS to - ``` - - - **Setup IIS** +``` + +**Setup IIS** - Open IIS Manager (*Start > Type 'IIS Manager'*) - Create your new site (*Expand Server > Right click sites > 'Add Websites'*) - Enter your site's name - - Enter the directory path to your 'client' folder (*C:\example\dist\client\*) + - Enter the directory path to your `client/` folder (*`C:\example\dist\client\`*) - Enter your hostname (*Your a-record*) - Leave all other defaults and click 'Ok' **Start your server** - - Run ```gulp serve:dist``` + - Run `gulp serve:dist` + # Congratulations, you did it! Now go code something awesome! - - From 3b695ca1644217382a9d65cc909b480a67171335 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 30 Aug 2016 19:58:34 -0400 Subject: [PATCH 073/104] chore(package): update generator-ng-component to version 1.0.2 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22376ab4d..e43a43837 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "babel-plugin-transform-flow-strip-types": "^6.7.0", "bluebird": "^3.3.5", "chalk": "^1.1.0", - "generator-ng-component": "~1.0.1", + "generator-ng-component": "~1.0.2", "glob": "^7.0.5", "gulp-babel": "^6.1.2", "gulp-beautify": "^2.0.0", From 885446902ca3a2c6be10b0e852a44dee47c769e8 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 30 Aug 2016 22:36:27 -0400 Subject: [PATCH 074/104] docs(readme): update media paths [skip ci] --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 3cbffb17a..b70aea88a 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,5 @@ # AngularJS Full-Stack generator -![generator-angular-fullstack](http://angular-fullstack.github.io/generator-angular-fullstack/media/svg/angular-fullstack-logo.svg) +![generator-angular-fullstack](http://angular-fullstack.github.io/generator-angular-fullstack/angular-fullstack-logo.svg) ![Build Status](https://img.shields.io/circleci/project/angular-fullstack/generator-angular-fullstack/master.svg) [![npm version](https://img.shields.io/npm/v/generator-angular-fullstack.svg)](https://www.npmjs.com/package/generator-angular-fullstack) @@ -164,4 +164,4 @@ Is your company using Angular-FullStack? Ask your boss to support the project. Y -![generator-angular-fullstack](http://angular-fullstack.github.io/generator-angular-fullstack/media/svg/angular-fullstack-boxes.svg) +![generator-angular-fullstack](http://angular-fullstack.github.io/generator-angular-fullstack/angular-fullstack-boxes.svg) From cfd1534ba894a3acf9b8107598baabad9ca27b9f Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 30 Aug 2016 22:41:59 -0400 Subject: [PATCH 075/104] docs(readme): remove 4.0.0 beta note [skip ci] --- readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/readme.md b/readme.md index b70aea88a..6c2036e57 100644 --- a/readme.md +++ b/readme.md @@ -24,8 +24,6 @@ Install `yo`, `gulp-cli`, and `generator-angular-fullstack`: npm install -g yo gulp-cli generator-angular-fullstack ``` -> To install the latest 4.0.0 Beta with Webpack support, use `generator-angular-fullstack@beta` - Run `yo angular-fullstack` ``` yo angular-fullstack From 52a2362628a614ec21be5c6053c3bf9c8f814d67 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Wed, 31 Aug 2016 16:36:33 +0200 Subject: [PATCH 076/104] chore(package): update bluebird to version 3.4.5 (#2193) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e43a43837..f2b9d6406 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "babel-plugin-syntax-class-properties": "^6.5.0", "babel-plugin-syntax-flow": "^6.5.0", "babel-plugin-transform-flow-strip-types": "^6.7.0", - "bluebird": "^3.3.5", + "bluebird": "^3.4.5", "chalk": "^1.1.0", "generator-ng-component": "~1.0.2", "glob": "^7.0.5", From 6f534fe522a23ad09789dac7fd895fc2cc1f3fc3 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 02:18:00 -0400 Subject: [PATCH 077/104] 4.0.2 --- CHANGELOG.md | 20 ++++++++++++++++++++ angular-fullstack-deps | 2 +- package.json | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d57b435..45f5838f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ + +## [4.0.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.1...v4.0.2) (2016-09-01) + + +### Bug Fixes + +* **client:socket.service:** import lodash named exports ([231e500](https://github.com/angular-fullstack/generator-angular-fullstack/commit/231e500)) +* **gulp:build:** remove protractor typings ([#2144](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2144)) ([b9abc58](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b9abc58)) + + +### Features + +* **docs:** add daux.io docs ([f1e7a87](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f1e7a87)) +* **gen:app:** + * add eslint to the yo write stream ([85921be](https://github.com/angular-fullstack/generator-angular-fullstack/commit/85921be)), closes [#2157](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2157) + * run eslint w/ fix on both client & server ([c5ab431](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c5ab431)) +* **gen:gulp:** add TODO tasks in gulpfile. rm 2 old grunt tasks ([1e25de7](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1e25de7)) + + + ## [4.0.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.6...v4.0.0) (2016-08-08) diff --git a/angular-fullstack-deps b/angular-fullstack-deps index 0554c3688..bcea71f2e 160000 --- a/angular-fullstack-deps +++ b/angular-fullstack-deps @@ -1 +1 @@ -Subproject commit 0554c36883990b14e8dc9f49d1b27c1f65730c29 +Subproject commit bcea71f2e10010c1c9fd27168197c225bbbb14bc diff --git a/package.json b/package.json index f2b9d6406..7d4fcf24f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-angular-fullstack", - "version": "4.0.1", + "version": "4.0.2", "description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node", "keywords": [ "yeoman-generator", From 5bb43beb7174c5918a6138c90c5e89529e57bbbd Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 02:18:55 -0400 Subject: [PATCH 078/104] fix(gen): fix doc img generation\n\nAdd gulp task to copy images to gh-pages --- gulpfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index c2eb24a3b..f0cb747c6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -183,10 +183,14 @@ gulp.task('lint', () => console.log('TODO')); gulp.task('daux', () => { return execAsync('daux'); }); +gulp.task('copy_docs_images', () => { + return gulp.src('./media/svg/*') + .pipe(gulp.dest('./static/')); +}); gulp.task('gh-pages', () => { return gulp.src('./static/**/*') .pipe(ghPages()); }); gulp.task('docs', cb => { - return runSequence('daux', 'gh-pages', cb); + return runSequence('daux', 'copy_docs_images', 'gh-pages', cb); }); From 23d373892f49592cc61b08317db79b36dfee99ee Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 16:24:17 -0400 Subject: [PATCH 079/104] docs(gettingStarted): fill-out Getting Started section more --- docs/01_Getting_Started/01_Prerequisites.md | 9 -- docs/01_Getting_Started/02_Installation.md | 14 ++ .../03_Running_Your_New_App.md | 10 ++ .../03_Running_the_Generator.md | 0 .../01_Getting_Started/04_Project_Overview.md | 126 ++++++++++++++++++ 5 files changed, 150 insertions(+), 9 deletions(-) create mode 100644 docs/01_Getting_Started/03_Running_Your_New_App.md delete mode 100644 docs/01_Getting_Started/03_Running_the_Generator.md diff --git a/docs/01_Getting_Started/01_Prerequisites.md b/docs/01_Getting_Started/01_Prerequisites.md index 5814f61d3..57aaeb001 100644 --- a/docs/01_Getting_Started/01_Prerequisites.md +++ b/docs/01_Getting_Started/01_Prerequisites.md @@ -21,12 +21,3 @@ Make a new directory, and `cd` into it: ```bash mkdir myapp && cd $_ ``` - -Run `yo angular-fullstack`, optionally passing an app name: -```bash -yo angular-fullstack -``` - -You'll then be asked a series of questions regarding options for the generated app. Such things include using JavaScript or TypeScript, -HTML or Pug, Bootstrap, SQL, and so on. If you don't know what to answer for a question, just hitting `ENTER` will use the default options -for that question, and move on to the next one. diff --git a/docs/01_Getting_Started/02_Installation.md b/docs/01_Getting_Started/02_Installation.md index e69de29bb..caf517734 100644 --- a/docs/01_Getting_Started/02_Installation.md +++ b/docs/01_Getting_Started/02_Installation.md @@ -0,0 +1,14 @@ +## Installation + +Run `yo angular-fullstack` (optionally passing an app name): +```bash +yo angular-fullstack +``` + +You'll then be asked a series of questions regarding options for the generated app. Such things include using JavaScript or TypeScript, +HTML or Pug, Bootstrap, SQL, and so on. If you don't know what to answer for a question, or just want to use our preferred options, +hitting `ENTER` will use the default options for that question, and move on to the next one. + +Once you've answered all the questions, a project will be scaffolded for you according to the options you entered. Then, npm dependencies +will automatically be installed. Once that's all complete, you're ready to get started with your app! + diff --git a/docs/01_Getting_Started/03_Running_Your_New_App.md b/docs/01_Getting_Started/03_Running_Your_New_App.md new file mode 100644 index 000000000..140d04528 --- /dev/null +++ b/docs/01_Getting_Started/03_Running_Your_New_App.md @@ -0,0 +1,10 @@ +## Running Your New App + +You can start your new app by running `gulp serve`. This will do some preliminary things like clean out temporary +files, lint your scripts, inject any new CSS files into your main one, apply environment variables, and download +any new TypeScript definitions. It will then start up a new development server, which will kick off a Webpack build. +it uses Browser Sync to facilitate front-end development. Your files will also be watched for changes. Any front-end +changes will kick off another webpack build. Any back-end changes will restart the back-end server, cleaning the +development database and re-seeding it as well. + +Once the `serve` tasks are complete, a browser tab should be opened to your new app server. diff --git a/docs/01_Getting_Started/03_Running_the_Generator.md b/docs/01_Getting_Started/03_Running_the_Generator.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/01_Getting_Started/04_Project_Overview.md b/docs/01_Getting_Started/04_Project_Overview.md index e69de29bb..517d540b5 100644 --- a/docs/01_Getting_Started/04_Project_Overview.md +++ b/docs/01_Getting_Started/04_Project_Overview.md @@ -0,0 +1,126 @@ +## Project Overview + +What follows is an overfiew of the files/folders in your newly generated project. + +### Project Root + +* .babelrc - configuration for [Babel], a JavaScript transpiler +* .editorconfig - config file used to keep conistent file editing across text editors +* .eslintrc - all of the rules applying to the ESLint JavaScript linter +* .travis.yml - a sample configuration file for Travis CI +* .yo-rc.json - a configuration file for the Angular Full-Stack Generator +* gulpfile.babel.js - Gulp task runner file +* karma.conf.js - Karma browser testing configuration +* mocha.conf.js - Mocha test framework configuration +* mocha.global.js - teardown file for Mocha +* package.json - npm manifest, contains information for all project dependencies +* protractor.conf.js - configuration for Protractor e2e test framework +* README.md - a readme file generator based on your options, for your scaffolded project +* spec.js - test file for Webpack used by Karma +* webpack.make.js - main file for Webpack configuration + * The following export the config from `webpack.make.js` for their respective build targets: + * webpack.dev.js + * webpack.test.js + * webpack.build.js + +### `client/` + +``` +│ .eslintrc // eslint config for client files +│ polyfills.js // imports of polyfills +│ _index.html // template for the root HTML file of your app +│ +├───app +│ │ app.config.js // contains app-wide configuration code +│ │ app.constants.js // gets injected with constants from `server/config/environment/shared.js` +│ │ app.{js,ts} // root JavaScript file of your app +│ │ app.{css,scss,stylus,less} // root CSS file of your app +│ │ +│ ├───account // pages related to login / signup / user settings +│ │ │ account.routes.js // route information +│ │ │ index.js // account module root +│ │ │ +│ │ ├───login +│ │ ├───settings +│ │ └───signup +│ │ +│ ├───admin // site admin page +│ │ +│ └───main // main component, homepage +│ +├───assets // where static assets are stored +│ +└───components + ├───auth + │ auth.module.js // module containing auth components + │ auth.service.js // authentication service + │ interceptor.service.js // intercepts requests and adds tokens if needed. Also redirects 401s to the login page. + │ router.decorator.js // facilitates auth-based routing configuration + │ user.service.js // user resource service + │ + ├───footer + │ + ├───modal + │ + ├───navbar + │ + ├───oauth-buttons // buttons for oauth login on signup / login pages + │ + ├───socket + │ socket.mock.js // mock service for unit testing + │ socket.service.js // service for Socket IO integration + │ + ├───ui-router + │ ui-router.mock.js // mock service for unit testing + │ + └───util // general utility service +``` + +### `server/` + +``` +│ .eslintrc // server-specific ESLint config, imports rules from root file +│ app.js // root server module +│ index.js // imports `app.js`. Enables Babel require hook when in development mode. +│ routes.js // imports / config for server endpoints +│ +├───api +│ ├───thing +│ │ index.js // root module +│ │ index.spec.js // root module tests +│ │ thing.controller.js // endpoint logic +│ │ thing.events.js // endpoint events (save, delete, etc) logic +│ │ thing.integration.js // integration tests +│ │ thing.model.js // Mongoose / Sequelize data model +│ │ thing.socket.js // Socket IO logic / config +│ │ +│ └───user // API for Users +│ +├───auth +│ │ auth.service.js +│ │ index.js // imports local/oauth auth modules +│ │ +│ ├───local // regular auth, signed up directly via your site +│ ├───google // Google OAuth +│ └─── +│ +└───config + │ express.js // Express server setup + │ local.env.js // ignored by Git + │ local.env.sample.js // sensitive environment variables are stored here, and added at server start. Copy to `local.env.js`. + │ seed.js // re-seeds database with fresh data + │ socketio.js // Socket IO configuration / imports + │ + └───environment + development.js + index.js + production.js + shared.js // config constants shared with the client code + test.js +``` + +### `e2e/` + +End-To-End testing files (use by [Protractor](https://github.com/angular/protractor) with [Mocha](https://github.com/mochajs/mocha)) + +[Babel]: https://babeljs.io/ From bae1c861f5ae67215f2d8deb8a8e01f27397054d Mon Sep 17 00:00:00 2001 From: antyrat Date: Fri, 26 Aug 2016 17:44:28 +0300 Subject: [PATCH 080/104] fix(webpack): fix boostrap-sass import path --- templates/app/client/app/app(sass).scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/client/app/app(sass).scss b/templates/app/client/app/app(sass).scss index e0956fff7..1f774272e 100644 --- a/templates/app/client/app/app(sass).scss +++ b/templates/app/client/app/app(sass).scss @@ -1,6 +1,6 @@ <%_ if (filters.bootstrap) { _%> $icon-font-path: '/assets/fonts/bootstrap/'; -@import '~bootstrap-sass/vendor/assets/stylesheets/bootstrap'; +@import '~bootstrap-sass/assets/stylesheets/bootstrap'; <%_ if(filters.oauth) { _%> @import '~bootstrap-social/bootstrap-social.scss'; <% }} _%> From 8e503265489219e47ed7b97553ef69b359129eb8 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 16:34:21 -0400 Subject: [PATCH 081/104] fix(gen:heroku): fix module export, gen base closes #2148 --- src/generators/heroku/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/generators/heroku/index.js b/src/generators/heroku/index.js index 0f86008f8..e44eed61e 100644 --- a/src/generators/heroku/index.js +++ b/src/generators/heroku/index.js @@ -6,9 +6,9 @@ import {exec} from 'child_process'; import chalk from 'chalk'; import path from 'path'; import s from 'underscore.string'; -import {genNamedBase} from '../generator-base'; +import {genBase} from '../generator-base'; -export default class Generator extends Base { +export class Generator extends Base { constructor(...args) { super(...args); @@ -16,7 +16,7 @@ export default class Generator extends Base { } initializing() { - return genNamedBase(this); + return genBase(this); } askForName() { @@ -203,3 +203,5 @@ Then deploy with }); } } + +module.exports = Generator; From d3dec09b1084a0c79002d5665d126d6d0130a110 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 16:47:22 -0400 Subject: [PATCH 082/104] 4.0.3 --- CHANGELOG.md | 12 ++++++++++++ angular-fullstack-deps | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f5838f7..3405009dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ + +## [4.0.3](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.2...v4.0.3) (2016-09-01) + + +### Bug Fixes + +* **gen:** fix doc img generation\n\nAdd gulp task to copy images to gh-pages ([5bb43be](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5bb43be)) +* **gen:heroku:** fix module export, gen base ([8e50326](https://github.com/angular-fullstack/generator-angular-fullstack/commit/8e50326)), closes [#2148](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2148) +* **webpack:** fix boostrap-sass import path ([bae1c86](https://github.com/angular-fullstack/generator-angular-fullstack/commit/bae1c86)) + + + ## [4.0.2](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.1...v4.0.2) (2016-09-01) diff --git a/angular-fullstack-deps b/angular-fullstack-deps index bcea71f2e..a09c069af 160000 --- a/angular-fullstack-deps +++ b/angular-fullstack-deps @@ -1 +1 @@ -Subproject commit bcea71f2e10010c1c9fd27168197c225bbbb14bc +Subproject commit a09c069af70cff7f92692d8a6ba3c4fe97c5195e diff --git a/package.json b/package.json index 7d4fcf24f..63bc75801 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-angular-fullstack", - "version": "4.0.2", + "version": "4.0.3", "description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node", "keywords": [ "yeoman-generator", From 9806bcd11abdb9f4999956779db9b771623e8487 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 16:52:43 -0400 Subject: [PATCH 083/104] docs(contributing): add release steps [skip ci] --- docs/Contributing/00_title.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/Contributing/00_title.md diff --git a/docs/Contributing/00_title.md b/docs/Contributing/00_title.md new file mode 100644 index 000000000..2ad089d04 --- /dev/null +++ b/docs/Contributing/00_title.md @@ -0,0 +1,22 @@ +## Contributing + +## Releasing a new version + +* Bump `package.json` version +* [ + * `grunt conventionalChangelog` + * `cd angular-fullstack-deps` + * `git checkout master` + * `git pull` + * `cd ..` + * `gulp updateFixtures:deps` + * `cd angular-fullstack-deps` + * `git add .` + * `git commit -m $VERSION` + * `git push` + * `# npm publish` +] +* `git add ./{CHANGELOG.md,angular-fullstack-deps,package.json}` +* `git commit -m $VERSION` +* `git push` +* `# npm publish` From aa320544ac7c9f0ecef610dbad741afe9b6f81da Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 16:54:08 -0400 Subject: [PATCH 084/104] fix(webpack): fix webpack vendor import (#2177) exclude angular-socket-io when user doesn't select socket.io --- templates/app/webpack.make.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/app/webpack.make.js b/templates/app/webpack.make.js index 031b3e149..361ede860 100644 --- a/templates/app/webpack.make.js +++ b/templates/app/webpack.make.js @@ -49,7 +49,8 @@ module.exports = function makeWebpackConfig(options) { <%_ if(filters.ngroute) { _%> 'angular-route',<% } %> 'angular-sanitize', - 'angular-socket-io', + <%_ if(filters.socketio) { _%> + 'angular-socket-io',<% } %> 'angular-ui-bootstrap', <%_ if(filters.uirouter) { _%> 'angular-ui-router',<% } %> From dd131d9b6d554001980b821ea05da1268f56d087 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 16:58:52 -0400 Subject: [PATCH 085/104] fix(webpack): conditionally exclude ui-bootstrap --- templates/app/webpack.make.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/app/webpack.make.js b/templates/app/webpack.make.js index 361ede860..6c04a7449 100644 --- a/templates/app/webpack.make.js +++ b/templates/app/webpack.make.js @@ -51,7 +51,8 @@ module.exports = function makeWebpackConfig(options) { 'angular-sanitize', <%_ if(filters.socketio) { _%> 'angular-socket-io',<% } %> - 'angular-ui-bootstrap', + <%_ if(filters.uibootstrap) { -%> + 'angular-ui-bootstrap',<% } %> <%_ if(filters.uirouter) { _%> 'angular-ui-router',<% } %> 'lodash' From d92cd677ccd104ab73d3d14a5ea893d1fd7278a7 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 1 Sep 2016 17:34:20 -0400 Subject: [PATCH 086/104] 4.0.4 --- CHANGELOG.md | 12 ++++++++++++ angular-fullstack-deps | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3405009dc..3aad085db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ + +## [4.0.4](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.3...v4.0.4) (2016-09-01) + + +### Bug Fixes + +* **webpack:** + * conditionally exclude ui-bootstrap ([dd131d9](https://github.com/angular-fullstack/generator-angular-fullstack/commit/dd131d9)) + * fix webpack vendor import ([#2177](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2177)) ([aa32054](https://github.com/angular-fullstack/generator-angular-fullstack/commit/aa32054)), closes [#2177](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2177) + + + ## [4.0.3](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.2...v4.0.3) (2016-09-01) diff --git a/angular-fullstack-deps b/angular-fullstack-deps index a09c069af..2ef5abe5b 160000 --- a/angular-fullstack-deps +++ b/angular-fullstack-deps @@ -1 +1 @@ -Subproject commit a09c069af70cff7f92692d8a6ba3c4fe97c5195e +Subproject commit 2ef5abe5b3c123203e6489195292ab12a24510eb diff --git a/package.json b/package.json index 63bc75801..50428cdf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-angular-fullstack", - "version": "4.0.3", + "version": "4.0.4", "description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node", "keywords": [ "yeoman-generator", From a6b5c3ffcba15aec5b252b1197f8ab24739bd9fd Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Thu, 1 Sep 2016 23:39:33 +0200 Subject: [PATCH 087/104] chore(package): update babel-plugin-transform-flow-strip-types to version 6.14.0 (#2173) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 50428cdf2..7b8dce5f8 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "babel-eslint": "^6.1.2", "babel-plugin-syntax-class-properties": "^6.5.0", "babel-plugin-syntax-flow": "^6.5.0", - "babel-plugin-transform-flow-strip-types": "^6.7.0", + "babel-plugin-transform-flow-strip-types": "^6.14.0", "bluebird": "^3.4.5", "chalk": "^1.1.0", "generator-ng-component": "~1.0.2", From de56f416e7698c00ac9a63a32d01b06198da0e3e Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Fri, 2 Sep 2016 02:30:20 -0400 Subject: [PATCH 088/104] chore(package): bump some dev deps (#2201) --- templates/app/_package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/app/_package.json b/templates/app/_package.json index 6015c6696..0512f43e6 100644 --- a/templates/app/_package.json +++ b/templates/app/_package.json @@ -70,7 +70,7 @@ "browser-sync": "^2.8.0", "bs-fullscreen-message": "^1.0.0", <%_ if(filters.flow) { -%> - "flow-bin": "^0.30.0", + "flow-bin": "^0.31.0", "babel-plugin-syntax-flow": "^6.8.0", "babel-plugin-transform-flow-comments": "^6.8.0",<% } %> "babel-plugin-transform-class-properties": "^6.6.0", @@ -88,13 +88,13 @@ "gulp-eslint": "^2.0.0", "gulp-imagemin": "^3.0.1", "gulp-inject": "^4.0.0", - "gulp-istanbul": "~0.10.3", + "gulp-istanbul": "^1.1.1", "gulp-istanbul-enforcer": "^1.0.3", "gulp-load-plugins": "^1.0.0-rc.1", "gulp-mocha": "^2.1.3", "gulp-node-inspector": "^0.1.0", "gulp-plumber": "^1.0.1", - "gulp-protractor": "^2.1.0", + "gulp-protractor": "^3.0.0", "gulp-rev": "^7.0.0", "gulp-rev-replace": "^0.4.2", "gulp-sort": "^2.0.0", @@ -120,19 +120,19 @@ "awesome-typescript-loader": "0.17.0", "ng-annotate-loader": "~0.1.0", "babel-loader": "^6.2.4", - "css-loader": "^0.23.1", - "file-loader": "^0.8.4", + "css-loader": "^0.24.0", + "file-loader": "^0.9.0", "imports-loader": "^0.6.5", "isparta-instrumenter-loader": "^1.0.0", "isparta-loader": "^2.0.0", "istanbul-instrumenter-loader": "^0.2.0", "null-loader": "^0.1.1", - "postcss-loader": "^0.9.1", + "postcss-loader": "^0.11.1", "raw-loader": "^0.5.1", "style-loader": "^0.13.0", <%_ if(filters.sass) { _%> "node-sass": "^3.8.0", - "sass-loader": "^3.1.1",<% } %> + "sass-loader": "^4.0.1",<% } %> <%_ if(filters.less) { _%> "less": "^2.7.1", "less-loader": "^2.2.3",<% } %> @@ -151,13 +151,13 @@ "karma": "~0.13.3", "karma-firefox-launcher": "^1.0.0", "karma-script-launcher": "^1.0.0", - "karma-coverage": "^0.5.3", - "karma-chrome-launcher": "^1.0.1", + "karma-coverage": "^1.0.0", + "karma-chrome-launcher": "^2.0.0", "karma-phantomjs-launcher": "~1.0.0", "karma-spec-reporter": "~0.0.20", "karma-sourcemap-loader": "~0.3.7", "sinon-chai": "^2.8.0", - "mocha": "^2.2.5",<% if(filters.mocha) { %> + "mocha": "^3.0.2",<% if(filters.mocha) { %> "karma-mocha": "^1.0.1", "karma-chai-plugins": "~0.7.0",<% } if(filters.jasmine) { %> "jasmine-core": "^2.3.4", From 9ce58e83bc558a480ba006dae392085d3153057f Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 6 Sep 2016 10:25:24 -0400 Subject: [PATCH 089/104] fix(client:oauthButtons): add ngInject (#2209) fixes #2206 [skip ci] --- templates/app/client/components/oauth-buttons(oauth)/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/app/client/components/oauth-buttons(oauth)/index.js b/templates/app/client/components/oauth-buttons(oauth)/index.js index bfa3b6ec0..5b328d684 100644 --- a/templates/app/client/components/oauth-buttons(oauth)/index.js +++ b/templates/app/client/components/oauth-buttons(oauth)/index.js @@ -2,6 +2,7 @@ import angular from 'angular'; export function OauthButtonsController($window) { + 'ngInject'; this.loginOauth = function(provider) { $window.location.href = '/auth/' + provider; }; From b530695eb91952b02740debb333d90db21248eba Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 6 Sep 2016 21:02:30 -0400 Subject: [PATCH 090/104] fix(socket): add ngInject (#2208) fixes #2203 [ci skip] --- .../app/client/components/socket(socketio)/socket.service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/app/client/components/socket(socketio)/socket.service.js b/templates/app/client/components/socket(socketio)/socket.service.js index 3e9dec2fd..a41af682a 100644 --- a/templates/app/client/components/socket(socketio)/socket.service.js +++ b/templates/app/client/components/socket(socketio)/socket.service.js @@ -4,6 +4,7 @@ import angular from 'angular'; import io from 'socket.io-client'; function Socket(socketFactory) { + 'ngInject'; // socket.io now auto-configures its connection when we ommit a connection url var ioSocket = io('', { // Send auth token on connection, you will need to DI the Auth service above From 118ddc4ae1c9dec954e64ecb33d0d9c41681a764 Mon Sep 17 00:00:00 2001 From: Greenkeeper Date: Tue, 13 Sep 2016 18:55:45 +0200 Subject: [PATCH 091/104] chore(package): update yeoman-test to version 1.5.0 (#2217) https://greenkeeper.io/ [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b8dce5f8..4d84b1186 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "shelljs": "^0.7.0", "should": "^11.1.0", "yeoman-assert": "^2.0.0", - "yeoman-test": "~1.4.0" + "yeoman-test": "~1.5.0" }, "engines": { "node": "^6.2.2", From 44dccba6091a9b5d362e342c61cf81dfda4c7298 Mon Sep 17 00:00:00 2001 From: Daniel Bornstrand Date: Sun, 28 Aug 2016 00:57:09 +0200 Subject: [PATCH 092/104] fix(heroku): Changed port variable to capital letters so heroku recognize it Heroku uses process.env.PORT with capital letters. closes #2185 --- templates/app/server/config/environment/production.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/app/server/config/environment/production.js b/templates/app/server/config/environment/production.js index 188362d88..96d5de11c 100644 --- a/templates/app/server/config/environment/production.js +++ b/templates/app/server/config/environment/production.js @@ -11,7 +11,7 @@ module.exports = { // Server port port: process.env.OPENSHIFT_NODEJS_PORT - || process.env.port + || process.env.PORT || <%= prodPort %><% if(filters.mongoose) { %>, // MongoDB connection options From 5991a7296da09d5607930a6756cda1e4e727c29e Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 13 Sep 2016 16:34:55 -0400 Subject: [PATCH 093/104] fix(server:twitter): make sure IDs are strings closes #1997 --- .../app/server/auth(auth)/twitter(twitterAuth)/passport.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/app/server/auth(auth)/twitter(twitterAuth)/passport.js b/templates/app/server/auth(auth)/twitter(twitterAuth)/passport.js index f13b4cfe7..7eb009912 100644 --- a/templates/app/server/auth(auth)/twitter(twitterAuth)/passport.js +++ b/templates/app/server/auth(auth)/twitter(twitterAuth)/passport.js @@ -8,6 +8,9 @@ export function setup(User, config) { callbackURL: config.twitter.callbackURL }, function(token, tokenSecret, profile, done) { + profile._json.id = `${profile._json.id}`; + profile.id = `${profile.id}`; + <% if(filters.mongooseModels) { %>User.findOne({'twitter.id': profile.id}).exec()<% } if(filters.sequelizeModels) { %>User.find({where:{'twitter.id': profile.id}})<% } %> .then(user => { From c1882297f562b72033b05b0ffda1092001743228 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 13 Sep 2016 16:39:54 -0400 Subject: [PATCH 094/104] fix(karma): remove extra `require` fixes #2219 --- templates/app/karma.conf.js | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/app/karma.conf.js b/templates/app/karma.conf.js index 7297c1bd0..812e588b2 100644 --- a/templates/app/karma.conf.js +++ b/templates/app/karma.conf.js @@ -47,7 +47,6 @@ module.exports = function(config) { }, plugins: [ - require('karma-chai-plugins'), require('karma-chrome-launcher'), require('karma-coverage'), require('karma-firefox-launcher'), From 1c2a2198786abcd9edc3f9c153760c293de56987 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Tue, 13 Sep 2016 16:50:42 -0400 Subject: [PATCH 095/104] fix(endpoint:controller): fix findOneAndUpdate syntax fixes #2221 --- templates/endpoint/basename.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/endpoint/basename.controller.js b/templates/endpoint/basename.controller.js index 364879ecf..63279b423 100644 --- a/templates/endpoint/basename.controller.js +++ b/templates/endpoint/basename.controller.js @@ -101,7 +101,7 @@ export function upsert(req, res) { delete req.body._id; } <%_ if(filters.mongooseModels) { -%> - return <%= classedName %>.findOneAndUpdate(req.params.id, req.body, {upsert: true, setDefaultsOnInsert: true, runValidators: true}).exec()<% } %> + return <%= classedName %>.findOneAndUpdate({_id: req.params.id}, req.body, {upsert: true, setDefaultsOnInsert: true, runValidators: true}).exec()<% } %> <%_ if(filters.sequelizeModels) { -%> return <%= classedName %>.upsert(req.body, { where: { From 3fdf251167f91ea36bf3a833123a2be19c4d6881 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 14 Sep 2016 00:45:02 -0400 Subject: [PATCH 096/104] chore(package): switch around maintainers --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7b8dce5f8..0c076435e 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ ], "homepage": "https://github.com/angular-fullstack/generator-angular-fullstack", "bugs": "https://github.com/angular-fullstack/generator-angular-fullstack/issues", - "author": "Tyler Henkel (http://tylerhenkel.com/)", + "author": "Andrew Koroluk (http://andrewk.me/)", "contributors": [ - "Andrew Koroluk (http://andrewk.me/)", + "Tyler Henkel (http://tylerhenkel.com/)", "Cody Mize (http://codymize.com/)", "Brian Ford (http://briantford.com/)", "Pascal Hartig (http://passy.me/)", From 6223187d683e0a71b544c7273ccc5e19e42e3656 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 14 Sep 2016 17:02:08 -0400 Subject: [PATCH 097/104] docs(prerequisites): add node-gyp info, etc --- docs/01_Getting_Started/01_Prerequisites.md | 38 ++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/docs/01_Getting_Started/01_Prerequisites.md b/docs/01_Getting_Started/01_Prerequisites.md index 57aaeb001..b210ffa31 100644 --- a/docs/01_Getting_Started/01_Prerequisites.md +++ b/docs/01_Getting_Started/01_Prerequisites.md @@ -1,11 +1,15 @@ ## Prerequisites -Make sure you have all the required dependencies available: +### npm modules + +Make sure you have all the required Node dependencies available: ```bash npm install -g yo gulp-cli generator-angular-fullstack ``` +### MongoDB + If you're using MongoDB (which you probably are), you'll have to install it from [here](https://www.mongodb.com/download-center#community). You should then run the `mongod` process, which is in `/MongoDB/Server//bin/`. You'll also want a `/data/db` folder somewhere for Mongo to put your database in. It would be wise to make a script to automate this command, and maybe even run this script on @@ -17,6 +21,38 @@ your computer's startup. Example: /var/lib/mongo/server/3.2/bin/mongod --dbpath /data/db ``` +### node-gyp + +`node-gyp` is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. You'll need it for things like brotli compression. + +Read through the [Installation section of the `node-gyp` readme](https://github.com/nodejs/node-gyp#installation). Basically you'll need [Python 2.7](https://www.python.org/downloads/), `make`, and a C/C++ compiler (like GCC on unix, Xcode on OS X, or Visual Studio tools on Windows). To tell npm to use Python 2.7 (if you also have a different version installed), run `npm config set python /path/to/executable/python2.7`. Here's a snapshot of the instructions from their readme: + + * On Unix: + * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) + * `make` + * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org) + * On Mac OS X: + * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on Mac OS X) + * [Xcode](https://developer.apple.com/xcode/download/) + * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -> Preferences -> Downloads` + * This step will install `gcc` and the related toolchain containing `make` + * On Windows: + * Option 1: Install all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator). + * Option 2: Install tools and configuration manually: + * Visual C++ Build Environment: + * Option 1: Install [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) using the **Default Install** option. + + * Option 2: Install [Visual Studio 2015](https://www.visualstudio.com/products/visual-studio-community-vs) (or modify an existing installation) and select *Common Tools for Visual C++* during setup. This also works with the free Community and Express for Desktop editions. + + > :bulb: [Windows Vista / 7 only] requires [.NET Framework 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40773) + + * Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.) + * Launch cmd, `npm config set msvs_version 2015` + + If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips. + +### Create a new folder for your project + Make a new directory, and `cd` into it: ```bash mkdir myapp && cd $_ From 09110872a4a96e359949432f67ed60ac48913d39 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 14 Sep 2016 17:13:05 -0400 Subject: [PATCH 098/104] docs(gettingStarted:overview): make root section look like the others --- .../01_Getting_Started/04_Project_Overview.md | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/01_Getting_Started/04_Project_Overview.md b/docs/01_Getting_Started/04_Project_Overview.md index 517d540b5..6b8ac7a78 100644 --- a/docs/01_Getting_Started/04_Project_Overview.md +++ b/docs/01_Getting_Started/04_Project_Overview.md @@ -4,24 +4,26 @@ What follows is an overfiew of the files/folders in your newly generated project ### Project Root -* .babelrc - configuration for [Babel], a JavaScript transpiler -* .editorconfig - config file used to keep conistent file editing across text editors -* .eslintrc - all of the rules applying to the ESLint JavaScript linter -* .travis.yml - a sample configuration file for Travis CI -* .yo-rc.json - a configuration file for the Angular Full-Stack Generator -* gulpfile.babel.js - Gulp task runner file -* karma.conf.js - Karma browser testing configuration -* mocha.conf.js - Mocha test framework configuration -* mocha.global.js - teardown file for Mocha -* package.json - npm manifest, contains information for all project dependencies -* protractor.conf.js - configuration for Protractor e2e test framework -* README.md - a readme file generator based on your options, for your scaffolded project -* spec.js - test file for Webpack used by Karma -* webpack.make.js - main file for Webpack configuration - * The following export the config from `webpack.make.js` for their respective build targets: - * webpack.dev.js - * webpack.test.js - * webpack.build.js +``` +.babelrc // configuration for [Babel], a JavaScript transpiler +.editorconfig // config file used to keep conistent file editing across text editors +.eslintrc // all of the rules applying to the ESLint JavaScript linter +.travis.yml // a sample configuration file for Travis CI +.yo-rc.json // a configuration file for the Angular Full-Stack Generator +gulpfile.babel.js // Gulp task runner file +karma.conf.js // Karma browser testing configuration +mocha.conf.js // Mocha test framework configuration +mocha.global.js // teardown file for Mocha +package.json // npm manifest, contains information for all project dependencies +protractor.conf.js // configuration for Protractor e2e test framework +README.md // a readme file generator based on your options, for your scaffolded project +spec.js // test file for Webpack used by Karma +webpack.make.js // main file for Webpack configuration + //The following export the config from `webpack.make.js` for their respective build targets: + webpack.dev.js + webpack.test.js + webpack.build.js +``` ### `client/` From 94ada7016a15d4eeef2202abaec33962892087d3 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 14 Sep 2016 17:14:20 -0400 Subject: [PATCH 099/104] docs(): set 'devloping' to 02 & 'deployment' to 03 --- docs/{Deployment => 02_Developing}/00_title.md | 0 docs/{Developing => 03_Deployment}/00_title.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename docs/{Deployment => 02_Developing}/00_title.md (100%) rename docs/{Developing => 03_Deployment}/00_title.md (100%) diff --git a/docs/Deployment/00_title.md b/docs/02_Developing/00_title.md similarity index 100% rename from docs/Deployment/00_title.md rename to docs/02_Developing/00_title.md diff --git a/docs/Developing/00_title.md b/docs/03_Deployment/00_title.md similarity index 100% rename from docs/Developing/00_title.md rename to docs/03_Deployment/00_title.md From f41e420992633f1d4b50f1d452da6277614d72c1 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 14 Sep 2016 21:09:28 -0400 Subject: [PATCH 100/104] fix(client:auth): fix hasOwnProperty instances, fix User usage (#2232) fixes #2212 [skip ci] --- .../client/components/auth(auth)/auth.service.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/templates/app/client/components/auth(auth)/auth.service.js b/templates/app/client/components/auth(auth)/auth.service.js index ac17e15ce..e38a12632 100644 --- a/templates/app/client/components/auth(auth)/auth.service.js +++ b/templates/app/client/components/auth(auth)/auth.service.js @@ -57,7 +57,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use */ logout() { $cookies.remove('token'); - currentUser = new User(); + currentUser = new _User(); }, /** @@ -103,7 +103,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use * @return {Promise} */ getCurrentUser(callback?: Function) { - var value = currentUser.hasOwnProperty('$promise') + var value = _.get(currentUser, '$promise') ? currentUser.$promise : currentUser; @@ -135,7 +135,8 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use isLoggedIn(callback?: Function) { return Auth.getCurrentUser(undefined) .then(user => { - var is = user.hasOwnProperty('role'); + let is = _.get(user, 'role'); + safeCb(callback)(is); return is; }); @@ -147,7 +148,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use * @return {Bool} */ isLoggedInSync() { - return currentUser.hasOwnProperty('role'); + return !!_.get(currentUser, 'role'); }, /** @@ -160,9 +161,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use hasRole(role, callback?: Function) { return Auth.getCurrentUser(undefined) .then(user => { - var has = user.hasOwnProperty('role') - ? hasRole(user.role, role) - : false; + let has = hasRole(_.get(user, 'role'), role); safeCb(callback)(has); return has; @@ -176,7 +175,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use * @return {Bool} */ hasRoleSync(role) { - return hasRole(currentUser.role, role); + return hasRole(_.get(currentUser, 'role'), role); }, /** From 0ba323585b1ec7cab4d564c0ca4b2015eef47884 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Wed, 14 Sep 2016 23:41:04 -0400 Subject: [PATCH 101/104] 4.0.5 --- CHANGELOG.md | 16 ++++++++++++++++ angular-fullstack-deps | 2 +- package.json | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aad085db..7c2fa3cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ + +## [4.0.5](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.4...v4.0.5) (2016-09-15) + + +### Bug Fixes + +* **client:auth:** fix hasOwnProperty instances, fix User usage ([#2232](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2232)) ([f41e420](https://github.com/angular-fullstack/generator-angular-fullstack/commit/f41e420)), closes [#2232](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2232) [#2212](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2212) +* **client:oauthButtons:** add ngInject ([#2209](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2209)) ([9ce58e8](https://github.com/angular-fullstack/generator-angular-fullstack/commit/9ce58e8)), closes [#2206](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2206) +* **endpoint:controller:** fix findOneAndUpdate syntax ([1c2a219](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1c2a219)), closes [#2221](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2221) +* **heroku:** Changed port variable to capital letters so heroku recognize it ([44dccba](https://github.com/angular-fullstack/generator-angular-fullstack/commit/44dccba)), closes [#2185](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2185) +* **karma:** remove extra `require` ([c188229](https://github.com/angular-fullstack/generator-angular-fullstack/commit/c188229)), closes [#2219](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2219) +* **server:twitter:** make sure IDs are strings ([5991a72](https://github.com/angular-fullstack/generator-angular-fullstack/commit/5991a72)), closes [#1997](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1997) +* **socket:** add ngInject ([#2208](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2208)) ([b530695](https://github.com/angular-fullstack/generator-angular-fullstack/commit/b530695)), closes [#2203](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2203) + + + ## [4.0.4](https://github.com/angular-fullstack/generator-angular-fullstack/compare/4.0.3...v4.0.4) (2016-09-01) diff --git a/angular-fullstack-deps b/angular-fullstack-deps index 2ef5abe5b..e2f7def7e 160000 --- a/angular-fullstack-deps +++ b/angular-fullstack-deps @@ -1 +1 @@ -Subproject commit 2ef5abe5b3c123203e6489195292ab12a24510eb +Subproject commit e2f7def7efccdf97c5b08cfa76409b3b4469b1a5 diff --git a/package.json b/package.json index f67232d00..ca8f6d93e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-angular-fullstack", - "version": "4.0.4", + "version": "4.0.5", "description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node", "keywords": [ "yeoman-generator", From 2633497081ff1f836b1b006fc7d14298c83a6446 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 15 Sep 2016 15:52:38 -0400 Subject: [PATCH 102/104] docs(changelog): retrofit 3.8.0 changelog [skip ci] --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c2fa3cad..55c91a2e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,29 @@ PUT now defaults to an upsert. PATCH now actually does an HTTP PATCH. Livereload has been removed in favor of [Browsersync](https://www.browsersync.io/) + + +# [3.8.0](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.6...v3.8.0) (2016-09-15) + + +### Bug Fixes + +* **authorization:** header workaround for IE11 ([2362103](https://github.com/angular-fullstack/generator-angular-fullstack/commit/2362103)), closes [#2051](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2051) +* **endpoint:controller:** wrap saveUpdates in an if(entity) statement ([31c0a79](https://github.com/angular-fullstack/generator-angular-fullstack/commit/31c0a79)), closes [#2052](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2052) [#2059](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2059) +* **grunt:** + * add comma ([485c44b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/485c44b)) + * run express:prod on production port ([aac61b2](https://github.com/angular-fullstack/generator-angular-fullstack/commit/aac61b2)), closes [#1814](https://github.com/angular-fullstack/generator-angular-fullstack/issues/1814) +* **gulp:** fix plain css generation ([#2013](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2013)) ([54479fc](https://github.com/angular-fullstack/generator-angular-fullstack/commit/54479fc)), closes [#2013](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2013) +* **gulpfile:** gulp-filter[@4](https://github.com/4).0.0 need "dot:true" option ([1fbf24b](https://github.com/angular-fullstack/generator-angular-fullstack/commit/1fbf24b)), closes [#2146](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2146) [#2151](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2151) +* **server:** return express stuff ([81ea8fa](https://github.com/angular-fullstack/generator-angular-fullstack/commit/81ea8fa)) + + +### Features + +* **gen:** add configurable ports ([#2005](https://github.com/angular-fullstack/generator-angular-fullstack/issues/2005)) ([50e6d0c](https://github.com/angular-fullstack/generator-angular-fullstack/commit/50e6d0c)) + + + ## [3.7.6](https://github.com/angular-fullstack/generator-angular-fullstack/compare/3.7.5...v3.7.6) (2016-06-21) From 93b53718a3f6807325bf04a28a02c38fe8cb0eac Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Thu, 15 Sep 2016 15:56:25 -0400 Subject: [PATCH 103/104] chore(package): enforce higher babel plugin versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ca8f6d93e..f5ee4c24a 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ }, "dependencies": { "babel-eslint": "^6.1.2", - "babel-plugin-syntax-class-properties": "^6.5.0", - "babel-plugin-syntax-flow": "^6.5.0", + "babel-plugin-syntax-class-properties": "^6.13.0", + "babel-plugin-syntax-flow": "^6.13.0", "babel-plugin-transform-flow-strip-types": "^6.14.0", "bluebird": "^3.4.5", "chalk": "^1.1.0", From ab38dd2e1733de9f445ec25653f2923d57e2055f Mon Sep 17 00:00:00 2001 From: JeremyMarshall Date: Mon, 19 Sep 2016 08:11:23 +1000 Subject: [PATCH 104/104] fix(gen:docker) remove grunt --- angular-fullstack-dockerfile | 2 +- src/generators/docker/index.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/angular-fullstack-dockerfile b/angular-fullstack-dockerfile index a35e52b7e..d92e4d3a1 160000 --- a/angular-fullstack-dockerfile +++ b/angular-fullstack-dockerfile @@ -1 +1 @@ -Subproject commit a35e52b7e236352479a10fb0d638a994be311053 +Subproject commit d92e4d3a18fda5b44fd872c3f41490008a736fca diff --git a/src/generators/docker/index.js b/src/generators/docker/index.js index 14865141d..77b593ce9 100644 --- a/src/generators/docker/index.js +++ b/src/generators/docker/index.js @@ -1,9 +1,11 @@ 'use strict'; +import util from 'util'; +import yeoman from 'yeoman-generator'; +import {Base} from 'yeoman-generator'; import {exec} from 'child_process'; import chalk from 'chalk'; import path from 'path'; -import {Base} from 'yeoman-generator'; -import Promise from 'bluebird'; +import s from 'underscore.string'; import {genBase} from '../generator-base'; export class Generator extends Base { @@ -26,10 +28,10 @@ export class Generator extends Base { }); } - gruntBuild() { + build() { this.log(chalk.bold('\nBuilding dist folder, please wait...')); - var buildCommand = this.filters.grunt ? 'grunt build' : 'gulp build'; + var buildCommand = 'gulp build'; return new Promise((resolve, reject) => { var child = exec(buildCommand, (err, stdout) => {