x3d-tidy 1.0.69 → 1.0.71

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": "x3d-tidy",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "description": "X3D Converter, Beautifier and Minimizer",
5
5
  "bin": {
6
6
  "x3d-tidy": "bin/x3d-tidy.js"
package/src/convert.js CHANGED
@@ -45,7 +45,7 @@ async function convert (argv)
45
45
  .command ("x3d-tidy", "X3D converter, beautifier and minimizer")
46
46
  .fail ((msg, error, yargs) =>
47
47
  {
48
- console .log (msg)
48
+ console .error (msg)
49
49
  process .exit (1)
50
50
  })
51
51
  .option ("cwd",
@@ -130,16 +130,16 @@ async function convert (argv)
130
130
 
131
131
  if (args .output)
132
132
  {
133
- const output = path .resolve (process .cwd (), args .output)
133
+ const output = path .resolve (args .cwd || process .cwd (), args .output)
134
134
 
135
135
  if (path .extname (output))
136
- fs .writeFileSync (output, getContents ({ ...options, type: path .extname (output) }))
136
+ fs .writeFileSync (output, getContents ({ ... options, type: path .extname (output) }))
137
137
  else
138
- console .log (getContents ({ ...options, type: path .basename (output) }))
138
+ console .log (getContents ({ ... options, type: path .basename (output) }))
139
139
  }
140
140
  else
141
141
  {
142
- console .log (getContents ({ ...options, type: path .extname (input) }))
142
+ console .log (getContents ({ ... options, type: path .extname (input) }))
143
143
  }
144
144
  }
145
145
 
package/src/main.js CHANGED
@@ -5,6 +5,8 @@ const
5
5
  path = require ("path"),
6
6
  colors = require ("colors")
7
7
 
8
+ colors .enable ()
9
+
8
10
  process .env .ELECTRON_DISABLE_SECURITY_WARNINGS = "true"
9
11
  // process .env .ELECTRON_ENABLE_LOGGING = 1
10
12