diff --git a/.travis.yml b/.travis.yml index 87d8619..39d130c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,9 @@ language: node_js node_js: - - '6.5' - - '6.4' - - '6.3' - - '6.2' - - '6.1' + - '7.1' + - '6.9' - '6.0' - '5.12' - - '5.11' - - '5.10' - - '5.9' - - '5.8' - - '5.7' - - '5.6' - - '5.5' - - '5.4' - - '5.3' - - '5.2' - - '5.1' - - '5.0' - '4.5' before_install: - currentfolder=${PWD##*/} diff --git a/generators/app/index.js b/generators/app/index.js index 848cfa6..9ee0ab8 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -35,7 +35,14 @@ module.exports = generator.Base.extend({ }); // Install redux and react bindings as requirement - this.npmInstall(['redux', 'react-redux'], { save: true }); + this.npmInstall(['redux', 'react-redux'], { 'save': true }); + + // Rewrite the webpack version the the last know working beta version + // It is left here in plain sight, to remind about the pain updating to + // a master branch without checking for the actual version. + // + // TODO: throw this out as soon as the next stable version is released + this.npmInstall(['webpack@2.1.0-beta.6'], { 'save-dev': true }); }); } }); diff --git a/generators/app/utils.js b/generators/app/utils.js index 0b4a06d..db494a2 100644 --- a/generators/app/utils.js +++ b/generators/app/utils.js @@ -2,11 +2,6 @@ const fs = require('fs'); const path = require('path'); -/* For regular JS files */ -//const esprima = require('esprima'); -//const escodegen = require('escodegen'); - -/* For files with JSX syntax */ const esprimaFb = require('esprima-fb'); const escodegenJsx = require('escodegen-wallaby'); diff --git a/generators/root/index.js b/generators/root/index.js index ab75b02..7aa08ca 100644 --- a/generators/root/index.js +++ b/generators/root/index.js @@ -1,4 +1,5 @@ const generator = require('yeoman-generator'); +const fs = require('fs'); module.exports = generator.Base.extend({ @@ -7,6 +8,21 @@ module.exports = generator.Base.extend({ this.argument('name', { type: String, required: true }); }, + /* + conflicts: function configuring() { + // Rewrite the webpack version the the last know working beta version + // It is left here in plain sight, to remind about the pain updating to + // a master branch without checking for the actual version. + // + // TODO: throw this out as soon as the next stable version is released + if(fs.existsSync(this.destinationPath('package.json'))) { + var config = JSON.parse(fs.readFileSync(this.destinationPath('package.json'))); + config.devDependencies.webpack = '=2.1.0-beta.6'; + fs.writeFileSync(this.destinationPath('package.json'), JSON.stringify(config)); + } + }, + */ + writing: function writing() { /* Some base functionality needs to be overwritten, so we force yeoman to do * so. This is not the nicest thing to do, but since this changes are needed @@ -56,5 +72,4 @@ module.exports = generator.Base.extend({ this.destinationPath('.eslintrc') ); } - }); diff --git a/package.json b/package.json index 0538116..9d4e2a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-react-webpack-redux", - "version": "1.0.3", + "version": "1.0.4", "description": "Yeoman generator for ReactJS and Flux (Redux) via Webpack", "keywords": [ "yeoman-generator", @@ -46,7 +46,7 @@ }, "devDependencies": { "chai": "^3.2.0", - "fs-extra": "^0.30.0", + "fs-extra": "^1.0.0", "mocha": "^3.0.0", "yeoman-assert": "^2.1.1", "yeoman-generator": "^0.24.1",