1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var errors_1 = require("./util/errors");
|
4 | var webpack_1 = require("./webpack");
|
5 | function bundle(context, configFile) {
|
6 | return bundleWorker(context, configFile)
|
7 | .catch(function (err) {
|
8 | throw new errors_1.BuildError(err);
|
9 | });
|
10 | }
|
11 | exports.bundle = bundle;
|
12 | function bundleWorker(context, configFile) {
|
13 | return webpack_1.webpack(context, configFile);
|
14 | }
|
15 | function bundleUpdate(changedFiles, context) {
|
16 | return webpack_1.webpackUpdate(changedFiles, context)
|
17 | .catch(function (err) {
|
18 | if (err instanceof errors_1.IgnorableError) {
|
19 | throw err;
|
20 | }
|
21 | throw new errors_1.BuildError(err);
|
22 | });
|
23 | }
|
24 | exports.bundleUpdate = bundleUpdate;
|
25 | function buildJsSourceMaps(context) {
|
26 | var webpackConfig = webpack_1.getWebpackConfig(context, null);
|
27 | return !!(webpackConfig.devtool && webpackConfig.devtool.length > 0);
|
28 | }
|
29 | exports.buildJsSourceMaps = buildJsSourceMaps;
|
30 | function getJsOutputDest(context) {
|
31 | return webpack_1.getOutputDest(context);
|
32 | }
|
33 | exports.getJsOutputDest = getJsOutputDest;
|