File tree 4 files changed +426
-5461
lines changed
4 files changed +426
-5461
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
- const cliparse = require ( 'cliparse' ) ;
4
- const pkg = require ( '../package.json' ) ;
5
- const fs = require ( 'fs' ) ;
3
+ const fs = require ( 'fs' )
4
+ const compile = require ( './commands/compile' )
6
5
7
- const compile = require ( './commands/compile' ) ;
6
+ const command = {
7
+ name : process . argv [ 2 ] ,
8
+ input : process . argv [ 3 ] ,
9
+ output : process . argv [ 4 ]
10
+ }
8
11
9
- cliparse . parse ( cliparse . cli ( {
10
- name : 'concise-cli' ,
11
- description : 'Command-line Interface for Concise CSS' ,
12
- version : pkg . version ,
13
- commands : [
14
- cliparse . command (
15
- 'compile' , {
16
- description : 'Compile code from Concise CSS' ,
17
- args : [
18
- cliparse . argument ( 'input' , { description : 'File to compile' } ) ,
19
- cliparse . argument ( 'output' , { description : 'Output CSS file' } )
20
- ]
21
- } , ( params ) => {
22
- compile ( params . args [ 0 ] ) . then ( css => {
23
- fs . writeFile ( params . args [ 1 ] , css , ( err ) => {
24
- if ( err ) { throw err ; }
25
- console . log ( `File written: ${ params . args [ 1 ] } \nFrom: ${ params . args [ 0 ] } ` ) ;
26
- } )
27
- } )
28
- }
29
- )
30
- ]
31
- } ) ) ;
12
+ switch ( command . name ) {
13
+ case 'compile' :
14
+ compile ( command . input ) . then ( css => {
15
+ fs . writeFile ( command . output , css , err => {
16
+ if ( err ) throw err
17
+ console . log ( `File written: ${ command . output } \nFrom: ${ command . input } ` ) ;
18
+ } )
19
+ } )
20
+ break
21
+ default :
22
+ break
23
+ }
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ h4 { font-size: 1.2rem; }
125
125
h5 { font-size : 1rem ; }
126
126
h6 { font-size : 0.8333rem ; }
127
127
h1 , h2 , h3 , h4 , h5 , h6 {
128
- color : getColor ( text, heading);
128
+ color : var ( --color- text- heading );
129
129
font-family : var (--font-secondary );
130
130
line-height : 1.3 ;
131
131
}
You can’t perform that action at this time.
0 commit comments