You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
346 B
14 lines
346 B
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'
|
|
}
|