Skip to content

Commit

Permalink
fix node_modules paths, add eslint to devDeps
Browse files Browse the repository at this point in the history
  • Loading branch information
clement committed Aug 28, 2020
1 parent 433dc4c commit d75bfa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function installShims ({ modules, overwrite }, done) {
}

parallel(shimPkgNames.map(function (name) {
var modPath = require.resolve(name)
var modPath = require.resolve(name, { paths: [path.join(__dirname.split('node_modules')[0], 'node_modules')] })
return function (cb) {
fs.exists(modPath, function (exists) {
if (!exists) return cb()
Expand Down Expand Up @@ -260,7 +260,7 @@ function copyShim (cb) {
function hackPackageJSONs (modules, done) {
fixPackageJSON(modules, './package.json', true)

var finder = find('./node_modules')
var finder = find(path.join(__dirname.split('node_modules')[0], 'node_modules'))

finder.on('file', function (file) {
if (path.basename(file) !== 'package.json') return
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"precommit": "npm run lint"
},
"devDependencies": {
"eslint": "^7.7.0",
"husky": "^0.14.3"
}
}
2 changes: 1 addition & 1 deletion pkg-hacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var path = require('path')
// }

module.exports = function hackFiles (hacks) {
var finder = find('./node_modules')
var finder = find(path.join(__dirname.split('node_modules')[0], 'node_modules'))
hacks = hacks || hackers.map(h => h.name)

finder.on('file', function (file) {
Expand Down

0 comments on commit d75bfa1

Please sign in to comment.