Icard/angular-clarity-master(work.../node_modules/@npmcli/node-gyp/lib/index.js

15 lines
349 B
JavaScript
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
const util = require('util')
const fs = require('fs')
const { stat } = fs.promises || { stat: util.promisify(fs.stat) }
async function isNodeGypPackage (path) {
return await stat(`${path}/binding.gyp`)
.then(st => st.isFile())
.catch(() => false)
}
module.exports = {
isNodeGypPackage,
defaultGypInstallScript: 'node-gyp rebuild',
}