source: trip-planner-front/node_modules/@npmcli/run-script/lib/run-script.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 484 bytes
Line 
1const rpj = require('read-package-json-fast')
2const runScriptPkg = require('./run-script-pkg.js')
3const validateOptions = require('./validate-options.js')
4const isServerPackage = require('./is-server-package.js')
5
6const runScript = options => {
7 validateOptions(options)
8 const {pkg, path} = options
9 return pkg ? runScriptPkg(options)
10 : rpj(path + '/package.json').then(pkg => runScriptPkg({...options, pkg}))
11}
12
13module.exports = Object.assign(runScript, { isServerPackage })
Note: See TracBrowser for help on using the repository browser.