aboutsummaryrefslogtreecommitdiff
path: root/tools/node.js
diff options
context:
space:
mode:
authorSampson Crowley <sampsonsprojects@gmail.com>2019-10-05 15:20:47 -0600
committerAlex Lam S.L <alexlamsl@gmail.com>2019-10-06 05:20:47 +0800
commit00ada0411170278e0899bdaf3dc9174abab629c7 (patch)
tree6e3fed5dfb96ddf3686e217e3d7af22f74f1deb7 /tools/node.js
parenta31c477feaf75a1590a4e89e39f1b0b0e7f33882 (diff)
downloadtracifyjs-00ada0411170278e0899bdaf3dc9174abab629c7.tar.gz
tracifyjs-00ada0411170278e0899bdaf3dc9174abab629c7.zip
facilitate Webpack compatibility (#3435)
Verbose application of `require.resolve` instead of `[].map`
Diffstat (limited to 'tools/node.js')
-rw-r--r--tools/node.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/tools/node.js b/tools/node.js
index 3e37092c..a1e14be1 100644
--- a/tools/node.js
+++ b/tools/node.js
@@ -1,21 +1,19 @@
var fs = require("fs");
exports.FILES = [
- "../lib/utils.js",
- "../lib/ast.js",
- "../lib/parse.js",
- "../lib/transform.js",
- "../lib/scope.js",
- "../lib/output.js",
- "../lib/compress.js",
- "../lib/sourcemap.js",
- "../lib/mozilla-ast.js",
- "../lib/propmangle.js",
- "../lib/minify.js",
- "./exports.js",
-].map(function(file) {
- return require.resolve(file);
-});
+ require.resolve("../lib/utils.js"),
+ require.resolve("../lib/ast.js"),
+ require.resolve("../lib/parse.js"),
+ require.resolve("../lib/transform.js"),
+ require.resolve("../lib/scope.js"),
+ require.resolve("../lib/output.js"),
+ require.resolve("../lib/compress.js"),
+ require.resolve("../lib/sourcemap.js"),
+ require.resolve("../lib/mozilla-ast.js"),
+ require.resolve("../lib/propmangle.js"),
+ require.resolve("../lib/minify.js"),
+ require.resolve("./exports.js"),
+];
new Function("MOZ_SourceMap", "exports", function() {
var code = exports.FILES.map(function(file) {