Permalink
Browse files

Fix NPM usig symlinks for file installs

  • Loading branch information...
abraham committed Jan 23, 2018
1 parent 6d420f8 commit 1f133f042548d60110cd40dff491f6beeec43273
Showing with 9 additions and 4 deletions.
  1. +3 −3 package.json
  2. +5 −0 scripts/rename-pack.js
  3. +1 −1 src/utils.ts
@@ -42,9 +42,9 @@
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"pretest": "mkdir tmp",
"test": "cd tmp && nutmeg new ci-test first:number second:string third:boolean --cli-source file:../.. --no-yarn && cd ci-test && npm run test",
"test:yarn": "cd tmp && nutmeg new ci-test first:number second:string third:boolean --cli-source file:../.. --yarn && cd ci-test && npm run test",
"pretest": "mkdir tmp && npm pack . && node ./scripts/rename-pack.js",
"test": "cd tmp && nutmeg new ci-test first:number second:string third:boolean --no-yarn --cli-source file:../../nutmeg-cli-latest.tgz && cd ci-test && npm run test",
"test:yarn": "cd tmp && nutmeg new ci-test first:number second:string third:boolean --yarn --cli-source file:../.. && cd ci-test && npm run test",
"watch": "tsc --watch"
},
"engines": {
@@ -0,0 +1,5 @@
const fs = require('fs');
const path = require('path');
const pkg = require(path.resolve('./package.json'));
fs.renameSync(path.resolve(`./nutmeg-cli-${pkg.version}.tgz`), path.resolve(`./nutmeg-cli-latest.tgz`));
@@ -48,7 +48,7 @@ function installDependencies(options: { withYarn: boolean, withDependencies: boo
console.log('📦 Skipping dependencies');
} else {
const useYarn = hasYarn() && options.withYarn;
console.log(`🎁 Installing dependencies with ${useYarn ? 'Yarn' : 'NPM'}`);
console.log(`🎁 Installing dependencies with ${useYarn ? 'Yarn' : 'NPM'}`);
if (useYarn) {
shell.exec('yarn', { silent: true });
} else {

0 comments on commit 1f133f0

Please sign in to comment.