Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cy_scripts/should-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const got = require('got')
const git = require('ggit')
const pluralize = require('pluralize')
const debug = require('debug')('deploy')
const { isEmpty, complement, tap, path, all, equals, T, values } = require('ramda')
const la = require('lazy-ass')
Expand Down Expand Up @@ -127,7 +126,7 @@ const changedFilesSince = (branchName) => (sha) => {
return git.changedFilesAfter(sha, branchName)
.then(tap((list) => {
debug('%s changed since last docs deploy in branch %s',
pluralize('file', list.length, true), branchName)
`${list.length} ${list.length === 1 ? 'file' : 'files'}`, branchName)
debug(list.join('\n'))
}))
}
Expand All @@ -139,7 +138,7 @@ function docsFilesChangedSinceLastDeploy (env, branchName) {
console.log('changed files')
console.log(list.join('\n'))
console.log('%d documentation %s changed since last doc deploy',
list.length, pluralize('file', list.length))
list.length, list.length === 1 ? 'file' : 'files')
console.log('in branch %s against environment %s', branchName, env)
}))
.then(docsChanged)
Expand Down
2 changes: 0 additions & 2 deletions lib/tags/aliases.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// const Promise = require('bluebird')

module.exports = function aliases (hexo, args) {
// {% aliases contain includes contains %}
// Appears as "Aliases: contain, includes, contains"
Expand Down
3 changes: 1 addition & 2 deletions lib/url_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const is = require('check-more-types')
const debug = require('debug')('docs')
const minimist = require('minimist')
const Keyv = require('keyv')
const pluralize = require('pluralize')
const YAML = require('yamljs')
const { commaLists } = require('common-tags')

Expand All @@ -28,7 +27,7 @@ if (process.env.REDIS_URL) {
debug('storing external HREF checks in memory')
}

debug('caching HREF checks for %s', pluralize('hour', CACHE_HOURS, true))
debug('caching HREF checks for %s', `${CACHE_HOURS} ${CACHE_HOURS === 1 ? 'hour' : 'hours'}`)

const startsWithHttpRe = /^http/
const everythingAfterHashRe = /(#.+)/
Expand Down
Loading