aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@npmcli/node-gyp/lib/index.js
blob: d4ebf14ed9af895984b218ae41228432433b07ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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'
}