pyret-npm 0.0.35 → 0.0.36

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.
package/client-lib.js CHANGED
@@ -5,6 +5,8 @@ const path = require('path');
5
5
  const mkdirp = require('mkdirp');
6
6
  const os = require('os');
7
7
 
8
+ const nodeModulesPath = path.join(__dirname, "node_modules");
9
+
8
10
  function findLocalParleyDir(base, localParley) {
9
11
  if(fs.existsSync(path.resolve(path.join(base, localParley)))) {
10
12
  return path.resolve(path.join(base, localParley));
@@ -67,6 +69,7 @@ function start(options) {
67
69
  if(localParleyDir === false) {
68
70
  try {
69
71
  mkdirp.sync(localParley);
72
+ fs.symlinkSync(nodeModulesPath, path.join(process.cwd(), localParley, "node_modules"));
70
73
  localParleyDir = path.resolve(path.join(process.cwd(), localParley));
71
74
  }
72
75
  catch(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyret-npm",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "The CLI for the Pyret programming language",
5
5
  "files": [
6
6
  "pyret.js",
package/pyret.js CHANGED
@@ -272,8 +272,9 @@ catch(e) {
272
272
  // Default behavior: use ".jarr" to replace ".arr"
273
273
  if(!options["pyret-options"]["outfile"] && options["pyret-options"]["program"]) {
274
274
  const programName = options["pyret-options"]["program"];
275
+ const parleyName = options["_all"]["local-parley"];
275
276
  if(path.extname(programName) === ".arr") {
276
- options["pyret-options"]["outfile"] = programName.slice(0, -4) + ".jarr";
277
+ options["pyret-options"]["outfile"] = path.join(parleyName, programName.slice(0, -4) + ".jarr");
277
278
  }
278
279
  }
279
280