src/preset/install-scripts.js
function install (presetName) {
  debug('run install from scripts, arguments: %o', arguments)

  const name = presetName || tryRequire(/elint-preset-/)[0]

  if (!name) {
    debug('can not fount preset, return')
    return
  }

  const nodeModulesDir = getNodeModulesDir()
  const keep = process.env.npm_config_keep || ''
  const presetModulePath = path.join(nodeModulesDir, name)

  link(presetModulePath, keep)
}
function install (presetName) {
  debug('run install from scripts, arguments: %o', arguments)

  const name = presetName || tryRequire(/elint-preset-/)[0]

  if (!name) {
    debug('can not fount preset, return')
    return
  }

  const nodeModulesDir = getNodeModulesDir()
  const keep = process.env.npm_config_keep || ''
  const presetModulePath = path.join(nodeModulesDir, name)

  link(presetModulePath, keep)
}
function install ( presetName ) { debug ( 'run install from scripts, arguments: %o' , arguments ) const name = presetName || tryRequire ( / elint-preset- / ) [ 0 ] if ( ! name ) { debug ( 'can not fount preset, return' ) return } const nodeModulesDir = getNodeModulesDir ( ) const keep = process . env . npm_config_keep || '' const presetModulePath = path . join ( nodeModulesDir , name ) link ( presetModulePath , keep ) }
install preset from npm scripts

@param {string} [presetName] preset name
@returns {void}
install preset from npm scripts