hoosat-create 1.0.1 → 1.1.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/index.js +9 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,6 +3,7 @@ const download = require('download-git-repo');
3
3
  const { promisify } = require('util');
4
4
  const promisifiedDownload = promisify(download);
5
5
  const readline = require('readline');
6
+ const { spawn } = require('child_process');
6
7
 
7
8
  const repository = 'github:Hoosat-Oy/react-express-typescript-ssr';
8
9
  const rl = readline.createInterface({
@@ -12,7 +13,14 @@ const rl = readline.createInterface({
12
13
 
13
14
  rl.question('Enter destination project name: ', (destination) => {
14
15
  promisifiedDownload(repository, destination)
15
- .then(() => console.log('Project downloaded successfully'))
16
+ .then(() => {
17
+ console.log('Project downloaded successfully');
18
+ console.log('Running npm install...');
19
+ const install = spawn('npm', ['install'], { cwd: destination, stdio: 'inherit' });
20
+ install.on('close', () => {
21
+ console.log('npm install completed');
22
+ });
23
+ })
16
24
  .catch(err => console.error(`Failed to download project: ${err}`))
17
25
  .finally(() => rl.close());
18
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoosat-create",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Hoosat Oy React + Express.js Typescript SSR project template.",
5
5
  "main": "index.js",
6
6
  "bin": {