feat: make appveyor optional
MODIFY
src/generators/app.ts
src/generators/app.ts
@@ -42,6 +42,7 @@ class App extends Generator {
defaults?: boolean
mocha: boolean
circleci: boolean
+ appveyor: boolean
codecov: boolean
'semantic-release': boolean
typescript: boolean
@@ -66,6 +67,7 @@ class App extends Generator {
options: {
mocha: boolean
circleci: boolean
+ appveyor: boolean
codecov: boolean
typescript: boolean
tslint: boolean
@@ -75,6 +77,7 @@ class App extends Generator {
}
mocha!: boolean
circleci!: boolean
+ appveyor!: boolean
codecov!: boolean
semantic_release!: boolean
ts!: boolean
@@ -97,6 +100,7 @@ class App extends Generator {
defaults: opts.defaults,
mocha: opts.options.includes('mocha'),
circleci: opts.options.includes('circleci'),
+ appveyor: opts.options.includes('appveyor'),
codecov: opts.options.includes('codecov'),
'semantic-release': opts.options.includes('semantic-release'),
typescript: opts.options.includes('typescript'),
@@ -231,6 +235,7 @@ class App extends Generator {
{name: 'yarn (npm alternative)', value: 'yarn', checked: this.options.yarn || hasYarn},
{name: 'mocha (testing framework)', value: 'mocha', checked: true},
{name: 'circleci (continuous integration/delivery service)', value: 'circleci', checked: true},
+ {name: 'appveyor (continuous integration/delivery service)', value: 'appveyor', checked: true},
{name: 'codecov (online code coverage report viewer)', value: 'codecov', checked: true},
{name: 'typescript (static typing for javascript)', value: 'typescript', checked: true},
{name: 'tslint (static analysis tool for typescript)', value: 'tslint', checked: true},
@@ -254,6 +259,7 @@ class App extends Generator {
this.yarn = this.options.yarn
this.mocha = this.options.mocha
this.circleci = this.options.circleci
+ this.appveyor = this.options.appveyor
this.codecov = this.options.codecov
this.semantic_release = this.options['semantic-release']
@@ -373,8 +379,10 @@ class App extends Generator {
// this.fs.copyTpl(this.templatePath('scripts/setup_git'), this.destinationPath('.circleci/setup_git'), this)
this.fs.copyTpl(this.templatePath('circle.yml.ejs'), this.destinationPath('.circleci/config.yml'), this)
}
- this.fs.copyTpl(this.templatePath('README.md.ejs'), this.destinationPath('README.md'), this)
+ if (this.appveyor) {
this.fs.copyTpl(this.templatePath('appveyor.yml.ejs'), this.destinationPath('appveyor.yml'), this)
+ }
+ this.fs.copyTpl(this.templatePath('README.md.ejs'), this.destinationPath('README.md'), this)
if (this.pjson.license === 'MIT' && (this.pjson.repository.startsWith('oclif') || this.pjson.repository.startsWith('heroku'))) {
this.fs.copyTpl(this.templatePath('LICENSE.mit'), this.destinationPath('LICENSE'), this)
}

MODIFY
templates/README.md.ejs
templates/README.md.ejs
<% if (circleci) { %>
[![CircleCI](https://circleci.com/gh/<%= repository %>/tree/master.svg?style=shield)](https://circleci.com/gh/<%= repository %>/tree/master)
<% } %>
+<% if (appveyor) { %>
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/<%= repository %>?branch=master&svg=true)](https://ci.appveyor.com/project/<%= repository %>/branch/master)
+<% } %>
<% if (codecov) { %>
[![Codecov](https://codecov.io/gh/<%= repository %>/branch/master/graph/badge.svg)](https://codecov.io/gh/<%= repository %>)
<% } %>

feat: make appveyor optional (#138)