fyn 1.0.1 → 1.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.
package/bin/bundle.js CHANGED
@@ -3,8 +3,22 @@
3
3
  var maj = parseInt(process.versions.node.split(".")[0], 10);
4
4
 
5
5
  if (maj >= 8) {
6
+ try {
7
+ require("../dist/v8-compile-cache");
8
+ } catch (err) {
9
+ if (
10
+ // is error caused by module not found?
11
+ (err.code &&
12
+ err.code !== "MODULE_NOT_FOUND" &&
13
+ err.message.indexOf("Cannot find module") < 0) ||
14
+ // is the not found module the one we are trying to require?
15
+ err.message.indexOf("v8-compile-cache") < 0
16
+ ) {
17
+ console.log(`Failed loading v8-compile-cache`, err);
18
+ }
19
+ }
6
20
  module.exports = "../dist/fyn.js";
7
21
  } else {
8
- console.log("Sorry, node version below 8 is not supported. Your version is", maj);
22
+ console.log("Sorry, fyn does not support node version below 8. Your version is", maj);
9
23
  process.exit(1);
10
24
  }
package/bin/fyn.js CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  require(require("./bundle"))
4
4
  .run()
5
+ .then(() => {
6
+ process.exit(0);
7
+ })
5
8
  .catch(err => {
9
+ console.log(err);
6
10
  process.exit(1);
7
11
  });