Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Run format
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Dec 9, 2019
1 parent e8def0e commit 3bcf951
Showing 1 changed file with 35 additions and 43 deletions.
78 changes: 35 additions & 43 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,54 @@ const paths = {
'examples/**/*.json',
'fixtures/**/*.json'
],
scripts: [
'*.js',
'examples/**/*.js',
'lib/**/*.js',
'test/**/*.js'
]
scripts: ['*.js', 'examples/**/*.js', 'lib/**/*.js', 'test/**/*.js']
}

export const standard = () => (
gulp.src(paths.scripts)
export const standard = () =>
gulp
.src(paths.scripts)
.pipe(gulpStandard())
.pipe(gulpStandard.reporter('default', {
breakOnError: true
}))
)
.pipe(
gulpStandard.reporter('default', {
breakOnError: true
})
)

export const jsonlint = () => (
gulp.src(paths.json)
export const jsonlint = () =>
gulp
.src(paths.json)
.pipe(gulpJsonlint())
.pipe(gulpJsonlint.failAfterError())
.pipe(gulpJsonlint.reporter())
)

export const watchScripts = () => (
gulp.src(paths.scripts)
.pipe(gulpWatch(paths.scripts, vinyl => {
if (vinyl.event === 'change') {
gulplog.info(`Linted ${vinyl.relative}`)
}
}))
export const watchScripts = () =>
gulp
.src(paths.scripts)
.pipe(
gulpWatch(paths.scripts, vinyl => {
if (vinyl.event === 'change') {
gulplog.info(`Linted ${vinyl.relative}`)
}
})
)
.pipe(gulpStandard())
.pipe(gulpStandard.reporter('default', {}))
)

export const watchJson = () => (
gulp.src(paths.json)
.pipe(gulpWatch(paths.json, vinyl => {
if (vinyl.event === 'change') {
gulplog.info(`Linted ${vinyl.relative}`)
}
}))
export const watchJson = () =>
gulp
.src(paths.json)
.pipe(
gulpWatch(paths.json, vinyl => {
if (vinyl.event === 'change') {
gulplog.info(`Linted ${vinyl.relative}`)
}
})
)
.pipe(gulpJsonlint())
.pipe(gulpJsonlint.reporter())
)

export const lint = gulp.parallel(
jsonlint,
standard
)
export const lint = gulp.parallel(jsonlint, standard)

export const watch = gulp.parallel(
watchJson,
watchScripts
)
export const watch = gulp.parallel(watchJson, watchScripts)

export default gulp.series(
lint,
watch
)
export default gulp.series(lint, watch)

0 comments on commit 3bcf951

Please sign in to comment.