Skip to content

Commit

Permalink
Update standard (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
SerayaEryn authored and Eomm committed Aug 22, 2019
1 parent a0d3dae commit 8f2d3cc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions generate-readme.js
Expand Up @@ -35,9 +35,9 @@ function generate (dir, { pluginMeta, encapsulated, pluginFileName }, cb) {

let accessibilityTemplate = ''
if (!encapsulated) {
accessibilityTemplate = `- [X] Accessible in the same context where you require them\n- [ ] Accessible only in a child context\n`
accessibilityTemplate = '- [X] Accessible in the same context where you require them\n- [ ] Accessible only in a child context\n'
} else {
accessibilityTemplate = `- [ ] Accessible in the same context where you require them\n- [X] Accessible only in a child context\n`
accessibilityTemplate = '- [ ] Accessible in the same context where you require them\n- [X] Accessible only in a child context\n'
}

const fastifyDecorators = toMarkdownList(pluginMeta.decorators.fastify)
Expand Down
6 changes: 3 additions & 3 deletions generate.js
Expand Up @@ -53,16 +53,16 @@ function generate (dir, cb) {
})

pkg.devDependencies = Object.assign(pkg.devDependencies || {}, {
tap: cliPkg.devDependencies['tap']
tap: cliPkg.devDependencies.tap
})

log('debug', `edited package.json, saving`)
log('debug', 'edited package.json, saving')
writeFile('package.json', JSON.stringify(pkg, null, 2), (err) => {
if (err) {
return cb(err)
}

log('debug', `saved package.json`)
log('debug', 'saved package.json')
log('info', `project ${pkg.name} generated successfully`)
log('debug', `run '${chalk.bold('npm install')}' to install the dependencies`)
log('debug', `run '${chalk.bold('npm start')}' to start the application`)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -67,7 +67,7 @@
"rimraf": "^3.0.0",
"simple-get": "^3.0.3",
"sinon": "^7.3.2",
"standard": "^13.0.1",
"standard": "^14.0.0",
"tap": "^12.5.3",
"walker": "^1.0.7"
},
Expand Down
4 changes: 2 additions & 2 deletions test/generate.test.js
Expand Up @@ -127,10 +127,10 @@ function define (t) {
t.equal(pkg.scripts.start, 'fastify start -l info app.js')
t.equal(pkg.scripts.dev, 'fastify start -l info -P app.js')
t.equal(pkg.dependencies['fastify-cli'], '^' + cliPkg.version)
t.equal(pkg.dependencies['fastify'], cliPkg.dependencies.fastify)
t.equal(pkg.dependencies.fastify, cliPkg.dependencies.fastify)
t.equal(pkg.dependencies['fastify-plugin'], cliPkg.devDependencies['fastify-plugin'] || cliPkg.dependencies['fastify-plugin'])
t.equal(pkg.dependencies['fastify-autoload'], cliPkg.devDependencies['fastify-autoload'])
t.equal(pkg.devDependencies['tap'], cliPkg.devDependencies['tap'])
t.equal(pkg.devDependencies.tap, cliPkg.devDependencies.tap)

const testGlob = pkg.scripts.test.split(' ')[1]
t.equal(minimatch.match(['test/services/plugins/more/test/here/ok.test.js'], testGlob).length, 1)
Expand Down

0 comments on commit 8f2d3cc

Please sign in to comment.