Skip to content

Commit

Permalink
v0.6.1 fix wrong dependency version in app template
Browse files Browse the repository at this point in the history
  • Loading branch information
matoilic committed May 30, 2016
1 parent b4e368c commit d92605f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/templates/core/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"babel-eslint": "^6.0.2",<% if(bootstrapCss) { %>
"bootstrap-sass": "^3.3.6",<% } %>
"eslint-config-angular-lazy": "^0.1.1",
"generator-angular-lazy": "^0.5.2",
"generator-angular-lazy": "~0.6.1",
"glob": "^7.0.3",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-angular-lazy",
"version": "0.6.0",
"version": "0.6.1",
"description": "Yeoman generator for creating Angular applications which lazy load components as needed at runtime. Based on SystemJS, JSPM, Babel and Gulp.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -53,6 +53,7 @@
"yo": "^1.8.0"
},
"scripts": {
"prepublish": "node scripts/prepublish.js",
"test": "eslint . && jasmine"
}
}
9 changes: 9 additions & 0 deletions scripts/prepublish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const fs = require('fs');
const packageInfo = require('../package.json');

const packageInfoTemplate = fs.readFileSync('app/templates/core/_package.json').toString();
const requiredDependency = `"generator-angular-lazy": "~${packageInfo.version}"`;

if (packageInfoTemplate.match(requiredDependency) === null) {
throw new Error('App template package.json might contain a wrong version of generator-angular-lazy!');
}

0 comments on commit d92605f

Please sign in to comment.