Skip to content

generator-ng-component 1.0.0 #2078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"babel-plugin-transform-flow-strip-types": "^6.7.0",
"bluebird": "^3.3.5",
"chalk": "^1.1.0",
"generator-ng-component": "~0.3.0",
"generator-ng-component": "~1.0.1",
"glob": "^7.0.3",
"gulp-babel": "^6.1.2",
"gulp-beautify": "^2.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ export class Generator extends Base {
if(this.filters.less) extensions.push('less');

filters.push('es6'); // Generate ES6 syntax code
filters.push('webpack'); // Generate ES6 Module imports/exports

this.composeWith('ng-component', {
options: {
Expand All @@ -428,7 +429,7 @@ export class Generator extends Base {
'basePath': 'client',
'forceConfig': this.forceConfig
}
}, { local: require.resolve('generator-ng-component/app/index.js') });
}, { local: require.resolve('generator-ng-component/generators/app/index.js') });
},
ngModules: function() {
var angModules = [
Expand Down Expand Up @@ -535,6 +536,7 @@ export class Generator extends Base {
['ngResource', 'angular-resource'],
['ngSanitize', 'angular-sanitize'],
['uiRouter', 'angular-ui-router'],
['ngRoute', 'angular-route'],
['uiBootstrap', 'angular-ui-bootstrap'],
['ngMessages', 'angular-messages'],
['io', 'socket.io-client']
Expand Down
2 changes: 1 addition & 1 deletion src/generators/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Generator extends Base {
this.composeWith('ng-component:component', {
arguments: this.arguments
}, {
local: require.resolve('generator-ng-component/component')
local: require.resolve('generator-ng-component/generators/component')
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/generators/controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:controller', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/controller') });
this.composeWith('ng-component:controller', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/controller') });
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/generators/decorator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:decorator', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/decorator') });
this.composeWith('ng-component:decorator', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/decorator') });
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/generators/directive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:directive', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/directive') });
this.composeWith('ng-component:directive', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/directive') });
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/generators/filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:filter', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/filter') });
this.composeWith('ng-component:filter', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/filter') });
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/generators/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:provider', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/provider') });
this.composeWith('ng-component:provider', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/provider') });
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/generators/route/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:route', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/route') });
this.composeWith('ng-component:route', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/route') });
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/generators/service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var yeoman = require('yeoman-generator');

var Generator = yeoman.Base.extend({
compose: function() {
this.composeWith('ng-component:service', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/service') });
this.composeWith('ng-component:service', {arguments: this.arguments}, { local: require.resolve('generator-ng-component/generators/service') });
}
});

Expand Down
3 changes: 2 additions & 1 deletion src/test/fixtures/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"expect",
"should",
"uirouter",
"es6"
"es6",
"modules"
],
"extensions": [
"babel",
Expand Down
74 changes: 37 additions & 37 deletions src/test/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function runEndpointGen(name, opt={}) {

gen
.on('error', reject)
.on('end', () => resolve())
.on('end', () => resolve());
});
}

Expand Down Expand Up @@ -131,15 +131,15 @@ describe('angular-fullstack:app', function() {
});

if(!process.env.SKIP_E2E) {
// it('should run e2e tests successfully', function() {
// this.retries(2);
// return runCmd('gulp test:e2e').should.be.fulfilled();
// });

// it('should run e2e tests successfully for production app', function() {
// this.retries(2);
// return runCmd('gulp test:e2e:prod').should.be.fulfilled();
// });
it.skip('should run e2e tests successfully', function() {
this.retries(2);
return runCmd('gulp test:e2e').should.be.fulfilled();
});

it.skip('should run e2e tests successfully for production app', function() {
this.retries(2);
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
});
}
});

Expand Down Expand Up @@ -243,15 +243,15 @@ describe('angular-fullstack:app', function() {
});

if(!process.env.SKIP_E2E) {
// it('should run e2e tests successfully', function() {
// this.retries(2);
// return runCmd('gulp test:e2e').should.be.fulfilled();
// });

// it('should run e2e tests successfully for production app', function() {
// this.retries(2);
// return runCmd('gulp test:e2e:prod').should.be.fulfilled();
// });
it.skip('should run e2e tests successfully', function() {
this.retries(2);
return runCmd('gulp test:e2e').should.be.fulfilled();
});

it.skip('should run e2e tests successfully for production app', function() {
this.retries(2);
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
});
}
});

Expand Down Expand Up @@ -315,15 +315,15 @@ describe('angular-fullstack:app', function() {
});

if(!process.env.SKIP_E2E) {
// it('should run e2e tests successfully', function() {
// this.retries(2);
// return runCmd('gulp test:e2e').should.be.fulfilled();
// });

// it('should run e2e tests successfully for production app', function() {
// this.retries(2);
// return runCmd('gulp test:e2e:prod').should.be.fulfilled();
// });
it.skip('should run e2e tests successfully', function() {
this.retries(2);
return runCmd('gulp test:e2e').should.be.fulfilled();
});

it.skip('should run e2e tests successfully for production app', function() {
this.retries(2);
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
});
}
});

Expand Down Expand Up @@ -388,15 +388,15 @@ describe('angular-fullstack:app', function() {
});

if(!process.env.SKIP_E2E) {
// it('should run e2e tests successfully', function() {
// this.retries(2);
// return runCmd('gulp test:e2e').should.be.fulfilled();
// });

// it('should run e2e tests successfully for production app', function() {
// this.retries(2);
// return runCmd('gulp test:e2e:prod').should.be.fulfilled();
// });
it.skip('should run e2e tests successfully', function() {
this.retries(2);
return runCmd('gulp test:e2e').should.be.fulfilled();
});

it.skip('should run e2e tests successfully for production app', function() {
this.retries(2);
return runCmd('gulp test:e2e:prod').should.be.fulfilled();
});
}
});
});