-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswaaplate.js
More file actions
executable file
·30 lines (26 loc) · 881 Bytes
/
swaaplate.js
File metadata and controls
executable file
·30 lines (26 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env node
'use strict';
/* requirements */
const lightjs = require('light-js');
const swProject = require('./src/js/root/project.js');
/* init */
init();
/**
* Initialize swaaplate.
*
*/
function init() {
lightjs.info('initialize swaaplate');
var args = process.argv.slice(2);
if (args.length === 1) {
lightjs.info('one parameter was found, use as absolute workspace path');
swProject.create(args[0]);
} else if (args.length === 0) {
lightjs.error('no absolute path was specified for the project');
} else if (args.length === 2 && args[0] === '-u') {
lightjs.info('two parameters were found, use first as updating the project, second as absolute workspace path');
swProject.update(args[1]);
} else {
lightjs.error('too many parameters were specified, one parameter for the workspace path of the project is allowed only');
}
}