Skip to content

Commit

Permalink
fix: fix wrong working directory when fetching template package
Browse files Browse the repository at this point in the history
  • Loading branch information
emyann committed Sep 28, 2018
1 parent cfef19c commit afbd4e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/cli/createTsLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ function createApp(name) {
async function run(root, appName, originalDirectory) {
function installTemplate(templateName) {
try {
console.log('loading template', templateName);
console.log(`loading ${templateName} template in ${path.resolve(__dirname)}`);
const res = require('child_process')
.execSync(`npm install ${templateName}`)
.execSync(`npm install ${templateName}`, { cwd: path.resolve(__dirname) })
.toString()
.trim();
console.log(`${templateName} loaded successfully`);
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "opencollective-postinstall"
},
"repository": {
"type": "git",
"url": "git+https://github.com/emyann/typescript-webpack-starter.git"
},
"repository": "nobrainr/typescript-webpack-starter",
"keywords": [
"webpack",
"javascript",
Expand Down Expand Up @@ -53,7 +50,7 @@
"validate-npm-package-name": "^3.0.0"
},
"devDependencies": {
"@nobrainr/typescript_universal-webpack-karma_jasmine": "1.0.0",
"@nobrainr/typescript_universal-webpack-karma_jasmine": "^1.0.0",
"marked": "^0.4.0",
"semantic-release": "^15.9.9"
},
Expand Down

0 comments on commit afbd4e0

Please sign in to comment.