Skip to content

Commit 390976c

Browse files
committed
Start fixing Ava
1 parent d32e274 commit 390976c

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

ava.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
'use strict'
22

33
export default {
4-
babel: false,
5-
compileEnhancements: false,
6-
files: ['dist/test'],
74
// Tests are setting listeners on `process` and stubbing global
85
// `process.exit`, `console`, `setTimeout` and `Error.prepareStackTrace`,
96
// so we cannot parallelize them.

gulp/files.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"examples",
1515
"*.md"
1616
],
17-
"BUILD": ["src", "test", "helpers"],
17+
"BUILD_SRC": ["src"],
18+
"BUILD_DIST": ["dist"],
1819
"DEV": [
1920
"{index,custom,gulpfile}.js",
2021
"src",

gulp/tasks/build.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,20 @@
33
const { series } = require('gulp')
44

55
const { getWatchTask } = require('../utils')
6-
const FILES = require('../files')
6+
const { BUILD_SRC, BUILD_DIST } = require('../files')
77
const gulpExeca = require('../exec')
88

9-
const babel = function() {
10-
const promises = FILES.BUILD.map(dir =>
11-
gulpExeca(
12-
`babel ${dir} --out-dir dist/${dir} --copy-files --delete-dir-on-start --source-maps --no-comments --minified --retain-lines`,
13-
),
9+
const babel = () =>
10+
gulpExeca(
11+
`babel ${BUILD_SRC} --out-dir ${BUILD_DIST} --copy-files --delete-dir-on-start --source-maps --no-comments --minified --retain-lines`,
1412
)
15-
return Promise.all(promises)
16-
}
1713

1814
const build = series(babel)
1915

2016
// eslint-disable-next-line fp/no-mutation
2117
build.description = 'Build source files'
2218

23-
const buildwatch = getWatchTask({ BUILD: build }, build)
19+
const buildwatch = getWatchTask({ BUILD_SRC: build }, build)
2420

2521
// eslint-disable-next-line fp/no-mutation
2622
buildwatch.description = 'Build source files in watch mode'

0 commit comments

Comments
 (0)