@ixon-cdk/svelte-builder 1.6.0 → 1.7.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.
Files changed (2) hide show
  1. package/browser.js +14 -9
  2. package/package.json +2 -2
package/browser.js CHANGED
@@ -120,26 +120,31 @@ async function _build(inputFile, outputFile, tag, assets, production, watch) {
120
120
  }
121
121
  });
122
122
  process.on('SIGINT', () => {
123
- fs.unlinkSync(entryFileName);
124
123
  process.exit(1);
125
124
  });
125
+ process.on('exit', () => {
126
+ fs.unlinkSync(entryFileName);
127
+ });
126
128
  }
127
129
  }
128
130
 
129
131
  function typeCheck({ tsConfig, inputDir }) {
130
132
  return {
131
133
  writeBundle() {
132
- require('child_process')
133
- .spawn('svelte-check', ['--tsconfig', tsConfig], {
134
+ const childProcess = require('child_process').spawn(
135
+ 'svelte-check',
136
+ ['--tsconfig', tsConfig],
137
+ {
134
138
  stdio: ['ignore', 'inherit', 'inherit'],
135
139
  shell: true,
136
140
  cwd: inputDir,
137
- })
138
- .once('close', code => {
139
- if (code === 1) {
140
- process.exit(1);
141
- }
142
- });
141
+ },
142
+ );
143
+ childProcess.once('close', code => {
144
+ if (code === 1) {
145
+ childProcess.kill();
146
+ }
147
+ });
143
148
  },
144
149
  };
145
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixon-cdk/svelte-builder",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "",
@@ -17,6 +17,6 @@
17
17
  "vite": "4.1.5"
18
18
  },
19
19
  "peerDependencies": {
20
- "@ixon-cdk/core": "^1.6.0"
20
+ "@ixon-cdk/core": "^1.7.0"
21
21
  }
22
22
  }