PHP 8.2.30
Preview: prepare.js Size: 1.03 KB
/proc/thread-self/root/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/lib/install/action/prepare.js

'use strict'
var chain = require('slide').chain
var lifecycle = require('../../utils/lifecycle.js')
var packageId = require('../../utils/package-id.js')
var prepublishWarning = require('../../utils/warn-deprecated.js')('prepublish-on-install')
var moduleStagingPath = require('../module-staging-path.js')

module.exports = function (staging, pkg, log, next) {
  log.silly('prepublish', packageId(pkg))
  // TODO: for `npm@5`, change the behavior and remove this warning.
  // see https://github.com/npm/npm/issues/10074 for details
  if (pkg.package && pkg.package.scripts && pkg.package.scripts.prepublish) {
    prepublishWarning([
      'As of npm@5, `prepublish` scripts are deprecated.',
      'Use `prepare` for build steps and `prepublishOnly` for upload-only.',
      'See the deprecation note in `npm help scripts` for more information.'
    ])
  }
  var buildpath = moduleStagingPath(staging, pkg)
  chain(
    [
      [lifecycle, pkg.package, 'prepublish', buildpath],
      [lifecycle, pkg.package, 'prepare', buildpath]
    ],
    next
  )
}

Directory Contents

Dirs: 0 × Files: 15

Name Size Perms Modified Actions
412 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
473 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
3.87 KB lrw-r--r-- 2021-09-28 10:29:10
Edit Download
524 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
3.81 KB lrw-r--r-- 2021-09-28 10:29:10
Edit Download
656 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
289 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
266 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
3.09 KB lrw-r--r-- 2021-09-28 10:29:10
Edit Download
274 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
272 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download
1.03 KB lrw-r--r-- 2021-09-28 10:29:10
Edit Download
1.50 KB lrw-r--r-- 2021-09-28 10:29:10
Edit Download
2.59 KB lrw-r--r-- 2021-09-28 10:29:10
Edit Download
659 B lrw-r--r-- 2021-09-28 10:29:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).