-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
bin.js
executable file
·35 lines (26 loc) · 680 Bytes
/
bin.js
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
31
32
33
34
35
#!/usr/bin/env node
const args = process.argv.slice(2);
const argv = require('minimist')(args);
var cmd = args[0];
var name = args[1];
var dist = argv.dist;
if(cmd == '--version' || cmd == '--v'){
console.log('Show current version');
}
if(cmd == 'init'){
var newCmd = require('./cli/init.js');
newCmd.init()
}
if(cmd == 'make:theme'){
if(name == undefined){
console.log('Please specify a theme name. Ex: npx webpixels make:theme awesome');
return;
}
if(dist == undefined){
console.log('Please specify the location of your Sass files. Ex: scss/');
return;
}
var newCmd = require('./cli/make.js');
newCmd.makeTheme(name, dist);
return;
}