1 |
|
2 |
|
3 | const stages = require('./stages').inferrableStages
|
4 |
|
5 | module.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 | }
|