Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
byp
/
izo
/
con7ext_sym404
/
rintoar.txt
/
lib
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
run-script
/
lib
:
run-script.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
const rpj = require('read-package-json-fast') const runScriptPkg = require('./run-script-pkg.js') const validateOptions = require('./validate-options.js') const isServerPackage = require('./is-server-package.js') const runScript = options => { validateOptions(options) const { pkg, path } = options return pkg ? runScriptPkg(options) : rpj(path + '/package.json') .then(readPackage => runScriptPkg({ ...options, pkg: readPackage })) } module.exports = Object.assign(runScript, { isServerPackage })