Skip to content

Commit 09601c9

Browse files
committed
Remove unnecessary cli package
1 parent 25dbe92 commit 09601c9

File tree

4 files changed

+426
-5461
lines changed

4 files changed

+426
-5461
lines changed

cli/index.js

+19-27
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
#!/usr/bin/env node
22

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')
65

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+
}
811

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+
}

dist/concise.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ h4 { font-size: 1.2rem; }
125125
h5 { font-size: 1rem; }
126126
h6 { font-size: 0.8333rem; }
127127
h1, h2, h3, h4, h5, h6 {
128-
color: getColor(text, heading);
128+
color: var(--color-text-heading);
129129
font-family: var(--font-secondary);
130130
line-height: 1.3;
131131
}

0 commit comments

Comments
 (0)