Skip to content

Commit

Permalink
chore(compiler): update compiler intro
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Jul 28, 2020
1 parent 7e538f4 commit 9875752
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions scripts/bundles/helpers/compiler-cjs-intro.js
Expand Up @@ -11,30 +11,25 @@ if (typeof globalThis === 'undefined') {
}
}

(gbl => {
if (!gbl.Buffer) {
gbl.Buffer = {};
}

const process = gbl.process = (gbl.process || {});
if (!process.argv) {
process.argv = [''];
}
let cwd = '/';
if (!process.cwd) {
process.cwd = () => cwd;
}
if (!process.chdir) {
process.chdir = (v) => cwd = v;
}
if (!process.nextTick) {
const resolved = Promise.resolve();
process.nextTick = (cb) => resolved.then(cb);
}
if (!process.platform) {
process.platform = 'stencil';
}
if (!process.version) {
process.version = 'v12.0.0';
}
})(globalThis);
const Buffer = globalThis.Buffer || {};
const process = globalThis.process || {};
if (!process.argv) {
process.argv = [''];
}
let __cwd = '/';
if (!process.cwd) {
process.cwd = () => __cwd;
}
if (!process.chdir) {
process.chdir = (v) => __cwd = v;
}
if (!process.nextTick) {
const resolved = Promise.resolve();
process.nextTick = (cb) => resolved.then(cb);
}
if (!process.platform) {
process.platform = 'stencil';
}
if (!process.version) {
process.version = 'v12.0.0';
}

0 comments on commit 9875752

Please sign in to comment.