flowershow 0.1.8 → 0.1.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # flowershow
2
2
 
3
+ ## 0.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Kill subprocesses when parent process is terminated.
8
+
3
9
  ## 0.1.8
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowershow",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Publish your digital garden",
5
5
  "bin": {
6
6
  "flowershow": "src/bin/cli.js"
@@ -165,9 +165,13 @@ export default class Installer {
165
165
  // install flowershow dependencies
166
166
  logWithSpinner({ symbol: "🌸", msg: `Installing Flowershow dependencies` });
167
167
  try {
168
- const { stdout, stderr } = await execa("npm", ["install"], {
168
+ const subprocess = execa("npm", ["install"], {
169
169
  cwd: flowershowDir,
170
170
  });
171
+ process.on("SIGINT", () => {
172
+ subprocess.kill("SIGINT");
173
+ });
174
+ const { stdout, stderr } = await subprocess;
171
175
  log(stdout);
172
176
  log(stderr);
173
177
  stopSpinner();
package/src/lib/build.js CHANGED
@@ -12,4 +12,7 @@ export default async function build(dir) {
12
12
  }
13
13
  const subprocess = execa("npm", ["run", "build"], { cwd: flowershowDir });
14
14
  subprocess.stdout.pipe(process.stdout);
15
+ process.on("SIGINT", () => {
16
+ subprocess.kill("SIGINT");
17
+ });
15
18
  }
@@ -5,4 +5,7 @@ export default async function buildExport(dir) {
5
5
  const flowershowDir = path.resolve(dir, FLOWERSHOW_FOLDER_NAME);
6
6
  const subprocess = execa("npm", ["run", "export"], { cwd: flowershowDir });
7
7
  subprocess.stdout.pipe(process.stdout);
8
+ process.on("SIGINT", () => {
9
+ subprocess.kill("SIGINT");
10
+ });
8
11
  }
@@ -12,4 +12,7 @@ export default async function preview(dir) {
12
12
  }
13
13
  const subprocess = execa("npm", ["run", "dev"], { cwd: flowershowDir });
14
14
  subprocess.stdout.pipe(process.stdout);
15
+ process.on("SIGINT", () => {
16
+ subprocess.kill("SIGINT");
17
+ });
15
18
  }