diff --git a/generators/app/index.js b/generators/app/index.js index e974d5d..f97d7c3 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -133,12 +133,6 @@ module.exports = generators.Base.extend({ this.options.plugins.push('karma-coffee-preprocessor'); } - this.option('travis', { - type: Boolean, - desc: 'Adds a .travis.yml file', - defaults: false - }); - this.option('template-path', { type: String, desc: 'Path where the config files should be read from', @@ -260,16 +254,7 @@ module.exports = generators.Base.extend({ this.gruntfile.registerTask('test', ['karma']); }, - setupTravis: function () { - if (!this.options.travis) { - return; - } - - this.fs.copy( - this.templatePath('travis.yml'), - this.destinationPath('.travis.yml') - ); - + writeRunner: function () { var data = this.fs.readJSON(this.destinationPath('package.json')); if (!data) { diff --git a/generators/app/templates/travis.yml b/generators/app/templates/travis.yml deleted file mode 100644 index 99e11d1..0000000 --- a/generators/app/templates/travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - v5 - - v4 -before_script: - - 'npm install -g bower grunt-cli' - - 'bower install' diff --git a/readme.md b/readme.md index f020514..d997cfa 100644 --- a/readme.md +++ b/readme.md @@ -73,10 +73,6 @@ The full list: Directory where Bower components are installed, if not in the default location. - * `--travis` Type: Boolean, Default: false - - Enable [Travis CI](https://travis-ci.org/) config generation by adding a .travis.yaml file. - * `--gruntfile-path` Type: String, Default: '' Path to a Gruntfile to edit. This is relative to your generators root directory. In other words, relative to `this.destinationRoot()` path. diff --git a/test/test-creation.js b/test/test-creation.js index 51b1bf3..c64c56d 100644 --- a/test/test-creation.js +++ b/test/test-creation.js @@ -68,38 +68,12 @@ describe('Karma generator creation test', function () { done(); }); }); - - it('creates a travis file but warns about missing package.json', function (done) { - gen.withOptions({travis: true}) - .on('end', function () { - gen.generator.log.error = gen.generator.log.__olderror; - assert.file(['.travis.yml']); - assert( - logMessage.indexOf('Could not open package.json for reading.') > -1 - ); - done(); - }); - }); - }); - - it('creates a travis file and updates package.json', function (done) { - helpers - .run(join(__dirname, '../generators/app')) - .withOptions({travis: true, force: true}) - .inTmpDir(function (dir) { - require('fs').writeFileSync(join(dir,'package.json'), '{}'); - }) - .on('end', function () { - assert.file(['.travis.yml']); - assert.fileContent('package.json', /grunt test/); - done(); - }); }); it('updates package.json with karma dependencies', function (done) { helpers .run(join(__dirname, '../generators/app')) - .withOptions({travis: true, force: true}) + .withOptions({force: true}) .inTmpDir(function (dir) { require('fs').writeFileSync(join(dir,'package.json'), '{"dependencies":{"grunt":"1.0.0"}}'); })