Skip to content

Commit afbd4e0

Browse files
committed
fix: fix wrong working directory when fetching template package
1 parent cfef19c commit afbd4e0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

packages/cli/createTsLib.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ function createApp(name) {
8080
async function run(root, appName, originalDirectory) {
8181
function installTemplate(templateName) {
8282
try {
83-
console.log('loading template', templateName);
83+
console.log(`loading ${templateName} template in ${path.resolve(__dirname)}`);
8484
const res = require('child_process')
85-
.execSync(`npm install ${templateName}`)
85+
.execSync(`npm install ${templateName}`, { cwd: path.resolve(__dirname) })
8686
.toString()
8787
.trim();
8888
console.log(`${templateName} loaded successfully`);

packages/cli/package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
"test": "echo \"Error: no test specified\" && exit 1",
1010
"postinstall": "opencollective-postinstall"
1111
},
12-
"repository": {
13-
"type": "git",
14-
"url": "git+https://github.com/emyann/typescript-webpack-starter.git"
15-
},
12+
"repository": "nobrainr/typescript-webpack-starter",
1613
"keywords": [
1714
"webpack",
1815
"javascript",
@@ -53,7 +50,7 @@
5350
"validate-npm-package-name": "^3.0.0"
5451
},
5552
"devDependencies": {
56-
"@nobrainr/typescript_universal-webpack-karma_jasmine": "1.0.0",
53+
"@nobrainr/typescript_universal-webpack-karma_jasmine": "^1.0.0",
5754
"marked": "^0.4.0",
5855
"semantic-release": "^15.9.9"
5956
},

0 commit comments

Comments
 (0)