Created
June 10, 2017 09:24
-
-
Save JeroenVinke/381b5d607c126ff36321b7a709bea61d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gulp from 'gulp'; | |
import {Server as Karma} from 'karma'; | |
import {CLIOptions} from 'aurelia-cli'; | |
import build from './build'; | |
import watch from './watch'; | |
import * as path from 'path'; | |
let karma = done => { | |
new Karma({ | |
configFile: path.join(__dirname, '/../../karma.conf.js'), | |
singleRun: !CLIOptions.hasFlag('watch') | |
}, done).start(); | |
}; | |
let unit; | |
if (CLIOptions.hasFlag('watch')) { | |
unit = gulp.series( | |
build, | |
gulp.parallel( | |
done => { watch(); done(); }, | |
karma | |
), | |
); | |
} else { | |
unit = gulp.series( | |
build, | |
karma | |
); | |
} | |
export { unit as default }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment