From 89ce919eee5b253f84298f95688d96962d0196bc Mon Sep 17 00:00:00 2001 From: ColCh Date: Sun, 2 Nov 2014 11:02:26 +0300 Subject: [PATCH] Store and assert config file --- app/index.js | 3 +++ test/test-creation.js | 1 + 2 files changed, 4 insertions(+) diff --git a/app/index.js b/app/index.js index 55136f7..93c72d0 100644 --- a/app/index.js +++ b/app/index.js @@ -32,7 +32,10 @@ var ReactWebpackGenerator = module.exports = function ReactWebpackGenerator(args this.installDependencies({ skipInstall: options['skip-install'] }); }); + this.pkg = JSON.parse(this.readFileAsString(path.join(__dirname, '../package.json'))); + + this.config.save(); }; util.inherits(ReactWebpackGenerator, yeoman.generators.Base); diff --git a/test/test-creation.js b/test/test-creation.js index b006aa5..c5c36ca 100644 --- a/test/test-creation.js +++ b/test/test-creation.js @@ -48,6 +48,7 @@ describe('react-webpack generator', function() { it('should generate dotfiles', function(done) { react.run({}, function() { helpers.assertFile([].concat(expected, [ + '.yo-rc.json', '.editorconfig', '.gitignore', '.jshintrc'