Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const readJSON = require('read-package-json')
const multipipe = require('multipipe')
const from2 = require('from2-array')
const resolve = require('resolve')
Expand All @@ -7,6 +6,17 @@ const findup = require('findup')
const path = require('path')
const bl = require('bl')

function readJSON (jsonFile, cb) {
if (typeof cb !== 'function') return

try {
const jsonContent = require(jsonFile)
cb(null, jsonContent)
} catch (err) {
cb(err)
}
}

module.exports = loader

function loader (source) {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"from2-array": "0.0.4",
"map-limit": "0.0.1",
"multipipe": "^0.3.0",
"read-package-json": "^2.0.2",
"resolve": "^1.1.6"
},
"devDependencies": {
Expand Down