xcratch-create 1.3.0 → 1.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcratch-create",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Support tool to create new extension for Xcratch",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "homepage": "https://github.com/xcratch/xcratch-create#readme",
30
30
  "dependencies": {
31
31
  "adm-zip": "^0.5.16",
32
- "fs-extra": "^11.3.0",
33
- "replace-in-file": "^8.3.0"
32
+ "fs-extra": "^11.3.3",
33
+ "replace-in-file": "^8.4.0"
34
34
  }
35
35
  }
@@ -4,14 +4,20 @@
4
4
  import path from 'path';
5
5
  import fs from 'fs-extra';
6
6
 
7
+ // Get scratch-vm path from command line argument
8
+ const args = process.argv.slice(2);
9
+ const vmPath = args[0] || '../scratch-editor/packages/scratch-vm';
10
+
7
11
  // modify for your environment
8
12
  const vmSrcDev = path.resolve(process.cwd(), './src/vm');
9
- const vmSrcOrg = path.resolve(process.cwd(), '../scratch-vm/src');
13
+ const vmSrcOrg = path.resolve(process.cwd(), vmPath, 'src');
10
14
  const vmRefs = [
11
15
  'extension-support',
12
16
  'util',
13
17
  ];
14
18
 
19
+ console.log(`Using scratch-vm at: ${vmSrcOrg}`);
20
+
15
21
  // Make symbolic link
16
22
  const makeSymbolicLink = function (to, from) {
17
23
  try {