UNPKG

netlify-cli

Version:

Netlify command line tool

26 lines (20 loc) 675 B
const { hasRequiredDeps, hasRequiredFiles, getYarnOrNPMCommand, scanScripts } = require('./utils/jsdetect') const FRAMEWORK_PORT = 3333 module.exports = function detector() { // REQUIRED FILES if (!hasRequiredFiles(['package.json'])) return false // REQUIRED DEPS if (!hasRequiredDeps(['@phenomic/core'])) return false /** everything below now assumes that we are within gatsby */ const possibleArgsArrs = scanScripts({ preferredScriptsArr: ['start'], preferredCommand: 'phenomic start', }) return { framework: 'phenomic', command: getYarnOrNPMCommand(), frameworkPort: FRAMEWORK_PORT, possibleArgsArrs, dist: 'public', } }