@typed/test
Version:
Testing made simple.
19 lines • 818 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Webpack = require("webpack");
const defaultWebpackConfig_1 = require("./defaultWebpackConfig");
function watchFile(cwd, input, output, extendConfiguration, cb, error) {
const defaultConfig = defaultWebpackConfig_1.defaultWebpackConfig(cwd, input, output);
const extendedConfiguration = Object.assign({}, extendConfiguration(defaultConfig));
extendedConfiguration.entry = defaultConfig.entry;
extendedConfiguration.output = defaultConfig.output;
const compiler = Webpack(extendedConfiguration);
compiler.watch({ aggregateTimeout: 600 }, (err, stats) => {
if (err) {
return error(err);
}
cb(stats);
});
}
exports.watchFile = watchFile;
//# sourceMappingURL=watchFile.js.map