-
Notifications
You must be signed in to change notification settings - Fork 0
/
create.js
22 lines (18 loc) · 913 Bytes
/
create.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const input = require('input');
const createPipelineStep = require('./scripts/create_pipelinestep')
const createPipelineComponent = require('./scripts/create_file_in_pipelinestep')
const createSammieComponent = require('./scripts/create_sammie_file')
const createPipeline = require('./scripts/create_pipeline')
async function askInput() {
console.log(`\nThis script creates common elements in development. Refer to .templates and .templates_py folders to see the used templates.\n`.blue);
const options = {
'New Pipeline Step':createPipelineStep,
'New React Component (TSX/SCSS) for a Pipeline Step':createPipelineComponent,
'New React Component (TSX/SCSS) for Sammie':createSammieComponent,
'New Pipeline':createPipeline,
}
let t = await input.select('What do you want to create?', Object.keys(options) );
//Call the script:
options[t]();
}
askInput();