polybundle 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/bundler.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polybundle",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Lua script bundler for Polytoria.",
5
5
  "license": "MIT",
6
6
  "bin": {
package/src/bundler.js CHANGED
@@ -121,14 +121,14 @@ function bundleEntries(entries, rootDir) {
121
121
  const moduleCache = new Map();
122
122
  const chunks = [];
123
123
 
124
- chunks.push("local __module_env = {}\n");
124
+ chunks.push("local __module_env = {};\n");
125
125
 
126
126
  for (const modulePath of moduleList) {
127
127
  const moduleSource = fs.readFileSync(modulePath, "utf8");
128
128
  const bundledModule = bundleModuleSource(moduleSource, modulePath, rootDir, moduleKeyMap, moduleCache, []);
129
129
  const moduleKey = moduleKeyMap.get(modulePath);
130
130
  const header = `-- polybundle: module ${moduleKey}\n`;
131
- const assignment = `__module_env[\"${moduleKey}\"] = (function()\n${normalizeLuaSource(bundledModule)}end)()\n`;
131
+ const assignment = `__module_env[\"${moduleKey}\"] = (function()\n${normalizeLuaSource(bundledModule)}end)();\n`;
132
132
  chunks.push(header + assignment);
133
133
  }
134
134
 
@@ -140,7 +140,7 @@ function bundleEntries(entries, rootDir) {
140
140
 
141
141
  const entrySource = fs.readFileSync(entryPath, "utf8");
142
142
  const replaced = replaceRequiresWithModuleRefs(entrySource, entryPath, rootDir, moduleKeyMap);
143
- const wrapped = `spawn(function()\n${normalizeLuaSource(replaced)}end)`;
143
+ const wrapped = `spawn(function()\n${normalizeLuaSource(replaced)}end);`;
144
144
  const header = `-- polybundle: begin ${path.relative(rootDir, entryPath)}\n`;
145
145
  const footer = `-- polybundle: end ${path.relative(rootDir, entryPath)}\n`;
146
146
  chunks.push(header + normalizeLuaSource(wrapped) + footer);