@ixon-cdk/static-builder 1.1.0-next.2 → 1.1.0-next.5

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.
Files changed (3) hide show
  1. package/browser.js +13 -3
  2. package/index.js +3 -3
  3. package/package.json +3 -3
package/browser.js CHANGED
@@ -40,8 +40,18 @@ async function _build(inputFile, outputFile, tag, assets, production, watch) {
40
40
  };
41
41
 
42
42
  // build
43
- await build(config);
44
- copyAssets(assets, inputDir, outputDir);
43
+ process.on('uncaughtException', (e) => {
44
+ console.error(e);
45
+ });
46
+
47
+ if (!watch) {
48
+ try {
49
+ await build(config);
50
+ copyAssets(assets, inputDir, outputDir);
51
+ } catch (e) {
52
+ console.error(e);
53
+ }
54
+ }
45
55
 
46
56
  // watch source files
47
57
  if (watch) {
@@ -54,7 +64,7 @@ async function _build(inputFile, outputFile, tag, assets, production, watch) {
54
64
  }
55
65
  });
56
66
  process.on('SIGINT', () => {
57
- process.exit();
67
+ process.exit(1);
58
68
  });
59
69
  }
60
70
  }
package/index.js CHANGED
@@ -16,19 +16,19 @@ function main() {
16
16
  logErrorMessage(
17
17
  'Must supply an input file, relative to the workspace root.',
18
18
  );
19
- process.exit();
19
+ process.exit(1);
20
20
  }
21
21
 
22
22
  if (!fs.existsSync(path.join(getRootDir(), input))) {
23
23
  logErrorMessage(`Input file '${input}' does not exist.`);
24
- process.exit();
24
+ process.exit(1);
25
25
  }
26
26
 
27
27
  if (!isPotentialCustomElementName(tag)) {
28
28
  logErrorMessage(
29
29
  `Custom element name '${tag}' is invalid. See https://html.spec.whatwg.org/multipage/custom-elements.html#prod-potentialcustomelementname`,
30
30
  );
31
- process.exit();
31
+ process.exit(1);
32
32
  }
33
33
 
34
34
  if (buildTarget === 'browser') {
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@ixon-cdk/static-builder",
3
- "version": "1.1.0-next.2",
3
+ "version": "1.1.0-next.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "",
7
7
  "license": "ISC",
8
8
  "dependencies": {
9
9
  "is-potential-custom-element-name": "^1.0.1",
10
- "vite": "^2.9.5"
10
+ "vite": "2.9.6"
11
11
  },
12
12
  "peerDependencies": {
13
- "@ixon-cdk/core": "^1.1.0-next.2"
13
+ "@ixon-cdk/core": "^1.1.0-next.5"
14
14
  }
15
15
  }