Skip to content

Commit

Permalink
fix: support hoodie install with linked node_modules folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Jun 3, 2017
1 parent 79dde6b commit 5ad3efa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/setup.js
Expand Up @@ -4,10 +4,11 @@ var path = require('path')
var fs = require('fs')
var log = require('npmlog')

var installIntoApp = process.env.PWD.indexOf('node_modules') !== -1
var workingDirectory = process.env.PWD
var installIntoApp = /node_modules/.test(workingDirectory)
// This block only executes if Hoodie is installed with as a dependency
if (installIntoApp) {
var pathToAppRoot = path.resolve('..', '..')
var pathToAppRoot = path.resolve(workingDirectory, '..', '..')
var packageJson = require(path.join(pathToAppRoot, 'package.json'))

packageJson.scripts = packageJson.scripts || {}
Expand Down

0 comments on commit 5ad3efa

Please sign in to comment.