flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
37
BACK_BACK/node_modules/parcel-bundler/lib/worker.js
generated
vendored
Executable file
37
BACK_BACK/node_modules/parcel-bundler/lib/worker.js
generated
vendored
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
||||
|
||||
require('v8-compile-cache');
|
||||
|
||||
const Pipeline = require('./Pipeline');
|
||||
|
||||
let pipeline;
|
||||
|
||||
function init(options) {
|
||||
pipeline = new Pipeline(options || {});
|
||||
Object.assign(process.env, options.env || {});
|
||||
process.env.HMR_PORT = options.hmrPort;
|
||||
process.env.HMR_HOSTNAME = options.hmrHostname;
|
||||
}
|
||||
|
||||
function run(_x, _x2) {
|
||||
return _run.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _run() {
|
||||
_run = (0, _asyncToGenerator2.default)(function* (path, isWarmUp) {
|
||||
try {
|
||||
return yield pipeline.process(path, isWarmUp);
|
||||
} catch (e) {
|
||||
e.fileName = path;
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
return _run.apply(this, arguments);
|
||||
}
|
||||
|
||||
exports.init = init;
|
||||
exports.run = run;
|
||||
Loading…
Add table
Add a link
Reference in a new issue