From 75c332453fd09bb306cdd36b5245da5221ac9307 Mon Sep 17 00:00:00 2001 From: Avi Haiat Date: Fri, 5 Feb 2016 11:55:11 +0200 Subject: [PATCH] feat(app): Scaffold travis file Fixes #21 --- generators/app/index.js | 6 ++++++ generators/app/templates/_package.json | 1 + generators/app/templates/_travis.yml | 12 ++++++++++++ test/mocha/app.spec.js | 1 + 4 files changed, 20 insertions(+) create mode 100644 generators/app/templates/_travis.yml diff --git a/generators/app/index.js b/generators/app/index.js index 5091b1f..d87b92d 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -131,6 +131,12 @@ module.exports = generators.Base.extend({ this.templatePath('_npmrc'), this.destinationPath('.npmrc') ); + + this.fs.copyTpl( + this.templatePath('_travis.yml'), + this.destinationPath('.travis.yml') + ); + this.fs.copyTpl( this.templatePath('_package.json'), this.destinationPath('package.json'), { diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index 4f91caa..37880e9 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -45,6 +45,7 @@ "devDependencies": { "autoprefixer": "^6.3.1", "browser-sync": "^2.10.1", + "coveralls": "^2.11.6", "css-loader": "^0.23.1", "eslint": "^1.10.3", "eslint-plugin-nodeca": "^1.0.3", diff --git a/generators/app/templates/_travis.yml b/generators/app/templates/_travis.yml new file mode 100644 index 0000000..44e5897 --- /dev/null +++ b/generators/app/templates/_travis.yml @@ -0,0 +1,12 @@ +language: node_js +sudo: false +node_js: + - v4 + +cache: + directories: + - node_modules + - bower_components + +after_success: + - cat ./coverage/unit/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose diff --git a/test/mocha/app.spec.js b/test/mocha/app.spec.js index 3a849c1..78d196c 100644 --- a/test/mocha/app.spec.js +++ b/test/mocha/app.spec.js @@ -27,6 +27,7 @@ describe(generatorShortname + ':app', function() { '.gitignore', '.jsbeautifyrc', '.npmrc', + '.travis.yml', '.yo-rc.json', 'karma.conf.js', 'package.json',