All files / src/install-from-boilerplate install.js

0% Statements 0/12
0% Branches 0/6
0% Functions 0/1
0% Lines 0/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                                   
const copyBoilerplate = require('./copy-boilerplate');
const { configScriptsKeys } = require('./config-scripts-keys');
const addScriptsKeys = require('./add-scripts-keys');
const { templates } = require('./config-templates');
 
// Resolve template from SPEC_UP_T_TEMPLATE environment variable.
// If not set or set to 'default', uses the original boilerplate (backward compatible).
const envTemplateId = process.env.SPEC_UP_T_TEMPLATE;
let selectedTemplate = null;
 
if (envTemplateId && envTemplateId !== 'default') {
    selectedTemplate = templates.find(t => t.id === envTemplateId) || null;
}
 
copyBoilerplate(selectedTemplate);
addScriptsKeys(configScriptsKeys);
 
require('./postinstall-message');