Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JeroenVinke/381b5d607c126ff36321b7a709bea61d to your computer and use it in GitHub Desktop.
Save JeroenVinke/381b5d607c126ff36321b7a709bea61d to your computer and use it in GitHub Desktop.
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