File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module.exports.handler = function handler(options) {
1313 let { projectName } = options ;
1414
1515 const fs = require ( 'fs-extra' ) ;
16+ const { stripIndent } = require ( 'common-tags' ) ;
1617 const pkg = require ( '../../package.json' ) ;
1718
1819 fs . outputFileSync ( projectName + '/README.md' , `# ${ projectName } \n` , 'utf8' ) ;
@@ -21,7 +22,7 @@ module.exports.handler = function handler(options) {
2122 {
2223 name : projectName ,
2324 version : '0.1.0' ,
24- script : {
25+ scripts : {
2526 test : 'codemod-cli test' ,
2627 } ,
2728 keywords : [ 'codemod-cli' ] ,
@@ -34,5 +35,30 @@ module.exports.handler = function handler(options) {
3435 spaces : 2 ,
3536 }
3637 ) ;
38+ fs . outputFileSync (
39+ projectName + '/.travis.yml' ,
40+ stripIndent `
41+ ---
42+ language: node_js
43+ node_js:
44+ - "6"
45+
46+ sudo: false
47+ dist: trusty
48+
49+ cache:
50+ yarn: true
51+
52+ before_install:
53+ - curl -o- -L https://yarnpkg.com/install.sh | bash
54+ - export PATH=$HOME/.yarn/bin:$PATH
55+
56+ install:
57+ - yarn install
58+
59+ script:
60+ - yarn test
61+ `
62+ ) ;
3763 fs . ensureFileSync ( projectName + '/transforms/.gitkeep' ) ;
3864} ;
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ QUnit.module('codemod-cli', function(hooks) {
4141 assert . equal ( result . code , 0 , 'exited with zero' ) ;
4242 assert . deepEqual ( walkSync ( input . path ( ) ) , [
4343 'ember-qunit-codemod/' ,
44+ 'ember-qunit-codemod/.travis.yml' ,
4445 'ember-qunit-codemod/README.md' ,
4546 'ember-qunit-codemod/package.json' ,
4647 'ember-qunit-codemod/transforms/' ,
You can’t perform that action at this time.
0 commit comments