Skip to content

Commit

Permalink
Fix "tasks did not complete" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed May 6, 2018
1 parent 567f3d1 commit 2500a8f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,18 @@ gulp.task('release', (callback) ->
return
)

gulp.task('changelog', ->
gulp.task('changelog', (callback) ->
num = 1
for arg in argv when /^-[1-9]$/.test(arg)
num = Number(arg[1])
entries = read('CHANGELOG.md').split(/^### .+/m)[1..num].join('')
process.stdout.write(html(entries))
callback()
)

gulp.task('readme', ->
gulp.task('readme', (callback) ->
process.stdout.write(html(read('README.md')))
callback()
)

# Reduce markdown to the small subset of HTML that AMO allows. Note that AMO
Expand All @@ -209,7 +211,7 @@ gulp.task('faster', ->
.pipe(gulp.dest('.'))
)

gulp.task('sync-locales', ->
gulp.task('sync-locales', (callback) ->
baseLocale = BASE_LOCALE
compareLocale = null
for arg in argv when arg[...2] == '--'
Expand All @@ -232,6 +234,8 @@ gulp.task('sync-locales', ->
if localeName == compareLocale
report.push(strings.map((string) -> " #{string}")...)
process.stdout.write(report.join('\n') + '\n')

callback()
)

syncLocale = (baseLocaleName, fileName) ->
Expand Down Expand Up @@ -277,9 +281,10 @@ parseLocaleFile = (fileContents) ->
return {keys, template: lines, newline}

generateHTMLTask = (filename, message) ->
gulp.task(filename, ->
gulp.task(filename, (callback) ->
unless fs.existsSync(filename)
process.stdout.write(message(filename))
callback()
return
gulp.src(filename)
.pipe(tap((file) ->
Expand Down

0 comments on commit 2500a8f

Please sign in to comment.