Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 70b9a92

Browse files
author
Glen Huang
committed
Remove input & output options from config file
1 parent 224b6b6 commit 70b9a92

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

bin/cssnext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ if ("sourcemap" in program) { config.sourcemap = program.sourcemap }
7676
if ("compress" in program) { config.compress = program.compress }
7777
if ("watch" in program) { config.watch = program.watch }
7878

79-
var input = program.args[0] ? path.resolve(program.args[0]) : config.input
80-
var output = program.args[1] ? path.resolve(program.args[1]) : config.output
79+
var input = program.args[0] ? path.resolve(program.args[0]) : null
80+
var output = program.args[1] ? path.resolve(program.args[1]) : null
8181
var verbose = program.verbose
8282

8383
if (input && !fs.existsSync(input)) {

test/cli.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ test("cli", function(t) {
5454
})
5555
planned+=3
5656

57-
exec(cssnextBin + " --config test/fixtures/config.json", function(err) {
57+
exec(cssnextBin + " --config test/fixtures/config.json test/fixtures/config.css", function(err, stdout) {
5858
if (err) { throw err }
59-
var res = utils.readFixture("config.output--io")
60-
t.equal(res, utils.readFixture("config.expected"), "should read config file on --config")
61-
utils.remove("config.output--io")
59+
t.equal(stdout, utils.readFixture("config.expected"), "should read config file on --config")
6260
})
6361
planned+=1
6462

test/fixtures/config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55
"--color": "#e00"
66
}
77
}
8-
},
9-
"input": "test/fixtures/config.css",
10-
"output": "test/fixtures/config.output--io.css"
8+
}
119
}

0 commit comments

Comments
 (0)