sunrize 1.0.76 → 1.0.78

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/bin/sunrize.js CHANGED
@@ -3,12 +3,10 @@
3
3
 
4
4
  const os = require ("os")
5
5
  const path = require ("path")
6
- const { spawn, execFileSync } = require ("child_process")
6
+ const { spawn } = require ("child_process")
7
7
 
8
8
  process .chdir (path .resolve (__dirname, ".."))
9
9
 
10
- execFileSync (os .platform () === "win32" ? "npm.cmd" : "npm", ["install", "--prefer-offline", "--silent"])
11
-
12
10
  const p = spawn (os .platform () === "win32" ? "npm.cmd" : "npm", ["start", "--silent", "--", ... process .argv .slice (2)])
13
11
 
14
12
  p .stdout .pipe (process .stdout)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.0.76",
4
+ "version": "1.0.78",
5
5
  "description": "A Multi Platform X3D Editor",
6
6
  "homepage": "https://create3000.github.io/sunrize/",
7
7
  "author": "Holger Seelig",
@@ -5,9 +5,16 @@ const
5
5
 
6
6
  class Template
7
7
  {
8
+ static #stats = new Map ()
9
+
8
10
  static create (template)
9
11
  {
10
- const filename = Template .filename (template)
12
+ const
13
+ filename = this .filename (template),
14
+ dirname = path .dirname (template),
15
+ stats = fs .statSync (dirname);
16
+
17
+ this .#stats .set (dirname, stats)
11
18
 
12
19
  const file = fs .readFileSync (template)
13
20
  .toString ()
@@ -15,13 +22,19 @@ class Template
15
22
  .replace (/(href=")(.*?)(")/sg, Template .resolve)
16
23
 
17
24
  fs .writeFileSync (filename, file)
25
+ fs .utimesSync (dirname, stats .atime, stats .mtime)
18
26
 
19
27
  return filename
20
28
  }
21
29
 
22
30
  static remove (template)
23
31
  {
24
- fs .unlinkSync (Template .filename (template))
32
+ const
33
+ dirname = path .dirname (template),
34
+ stats = this .#stats .get (dirname)
35
+
36
+ fs .unlinkSync (this .filename (template))
37
+ fs .utimesSync (dirname, stats .atime, stats .mtime)
25
38
  }
26
39
 
27
40
  static filename (template)