angular-cn/tools/build/pubserve.js
Julie Ralph 5a59e44765 chore(test): migrate Dart tests to package:test
Instead of running with karma and the karma-dart shim, run dart
tests directly using the new package:test runner. This migrates
away from package:unittest.

Fixes a couple tests, mostly associated with depending on absolute
URLs or editing the test providers after an injector had already
been created.

Remove karma-dart and associated files. Change gupfiles to run tests
via `pub run test` instead.
2016-03-04 02:27:44 +00:00

15 lines
494 B
JavaScript

var util = require('./util');
var spawn = require('child_process').spawn;
module.exports = function(gulp, plugins, config) {
return function() {
config.port = config.port || 8080;
var pubMode = config.mode || 'debug';
var pubArgs = ['serve', '--mode', pubMode, '--port', config.port];
return util.streamToPromise(spawn(config.command, pubArgs, {
// pub serve is very spammy, and --verbosity flag doesn't fix it
cwd: config.path, stdio: 'inherit'
}));
};
};