Skip to content

Commit 75f2292

Browse files
committed
export the isServerPackage function
1 parent 89ce68d commit 75f2292

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/run-script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const rpj = require('read-package-json-fast')
22
const runScriptPkg = require('./run-script-pkg.js')
33
const validateOptions = require('./validate-options.js')
4+
const isServerPackage = require('./is-server-package.js')
45

56
const runScript = options => {
67
validateOptions(options)
@@ -9,4 +10,4 @@ const runScript = options => {
910
: rpj(path + '/package.json').then(pkg => runScriptPkg({...options, pkg}))
1011
}
1112

12-
module.exports = runScript
13+
module.exports = Object.assign(runScript, { isServerPackage })

test/run-script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ t.test('package provided, skip look up', t =>
1919
path: 'foo',
2020
pkg: 'bar',
2121
})))
22+
23+
t.isa(runScript.isServerPackage, 'function', 'export isServerPackage fn')

0 commit comments

Comments
 (0)