Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

69 lines
1.7 KiB

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _plugin() {
const data = require("@parcel/plugin");
_plugin = function () {
return data;
};
return data;
}
function _fs() {
const data = _interopRequireDefault(require("fs"));
_fs = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const HMR_RUNTIME = _fs().default.readFileSync(_path().default.join(__dirname, './loaders/hmr-runtime.js'), 'utf8');
var _default = new (_plugin().Runtime)({
apply({
bundle,
options
}) {
if (bundle.type !== 'js' || !options.hmrOptions || bundle.env.isLibrary || bundle.env.isWorklet() || bundle.env.sourceType === 'script') {
return;
}
const {
host,
port
} = options.hmrOptions;
return {
filePath: __filename,
code: `var HMR_HOST = ${JSON.stringify(host != null ? host : null)};` + `var HMR_PORT = ${JSON.stringify(port != null && ( // Default to the HTTP port in the browser, only override
// in watch mode or if hmr port != serve port
!options.serveOptions || options.serveOptions.port !== port) ? port : null)};` + `var HMR_SECURE = ${JSON.stringify(!!(options.serveOptions && options.serveOptions.https))};` + `var HMR_ENV_HASH = "${bundle.env.id}";` + `module.bundle.HMR_BUNDLE_ID = ${JSON.stringify(bundle.id)};` + HMR_RUNTIME,
isEntry: true,
env: {
sourceType: 'module'
}
};
}
});
exports.default = _default;