• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1const util = require('util')
2const fs = require('fs')
3const { stat } = fs.promises || { stat: util.promisify(fs.stat) }
4
5async function isNodeGypPackage (path) {
6  return await stat(`${path}/binding.gyp`)
7    .then(st => st.isFile())
8    .catch(() => false)
9}
10
11module.exports = {
12  isNodeGypPackage,
13  defaultGypInstallScript: 'node-gyp rebuild',
14}
15