UNPKG

319 BJavaScriptView Raw
1'use strict'
2
3const stages = require('./stages').inferrableStages
4
5module.exports = function infer (app) {
6 const inferredStage = stages.find(stage => stage.inferRegex.test(app))
7
8 if (inferredStage) {
9 return [ app.replace(inferredStage.inferRegex, ''), inferredStage.name ]
10 }
11
12 return [ app, 'production' ]
13}