This repository was archived by the owner on Dec 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +34
-0
lines changed Expand file tree Collapse file tree 6 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1
1
2
2
- Fixed: replacement of ` postcss-log-warnings ` (deprecated) by ` postcss-reporter `
3
3
([ #162 ] ( https://github.com/cssnext/cssnext/issues/162 ) )
4
+ - Fixed: CLI now add ` to ` option automatically
5
+ ([ #159 ] ( https://github.com/cssnext/cssnext/issues/159 ) )
6
+ If you were happy with the previous CLI behavior (which was not rebasing url), you should probably just add the ` --no-url ` to keep the CSS as it was.
7
+ - Added: CLI output file dirname is now automatically created (using ` mkdirp ` )
8
+ ([ #146 ] ( https://github.com/cssnext/cssnext/issues/146 ) )
4
9
5
10
# 1.7.1 - 2015-06-19
6
11
Original file line number Diff line number Diff line change 32
32
"commander" : " ^2.3.0" ,
33
33
"cssnano" : " ^2.0.1" ,
34
34
"exit" : " ^0.1.2" ,
35
+ "mkdirp" : " ^0.5.1" ,
35
36
"pixrem" : " ^1.1.0" ,
36
37
"pleeease-filters" : " ^1.0.0" ,
37
38
"postcss" : " ^4.0.2" ,
Original file line number Diff line number Diff line change @@ -35,6 +35,25 @@ test("cli", function(t) {
35
35
)
36
36
planned += 1
37
37
38
+ exec (
39
+ cssnextBin +
40
+ " src/__tests__/fixtures/cli.css" +
41
+ " src/__tests__/fixtures/cli/output--io.css" ,
42
+ function ( err ) {
43
+ if ( err ) {
44
+ throw err
45
+ }
46
+ const res = utils . readFixture ( "cli/output--io" )
47
+ t . equal (
48
+ res ,
49
+ "body {\n color: #e00;\n background: url(../url);\n}\n" ,
50
+ "should rebase url"
51
+ )
52
+ utils . remove ( "cli/output--io" )
53
+ }
54
+ )
55
+ planned += 1
56
+
38
57
exec ( cssnextBin + " src/__tests__/fixtures/cli.css" , function ( err , stdout ) {
39
58
if ( err ) {
40
59
throw err
Original file line number Diff line number Diff line change 4
4
5
5
body {
6
6
color : var (--red );
7
+ background : url (url);
7
8
}
Original file line number Diff line number Diff line change 1
1
body {
2
2
color : # e00 ;
3
+ background : url (url);
3
4
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import path from "path"
8
8
// we will this instead of process.exit()
9
9
import exit from "exit"
10
10
11
+ import mkdirp from "mkdirp"
11
12
import color from "chalk"
12
13
import program from "commander"
13
14
@@ -97,6 +98,12 @@ if (input && !fs.existsSync(input)) {
97
98
}
98
99
99
100
config . from = input
101
+ config . to = output
102
+
103
+ if ( output ) {
104
+ mkdirp . sync ( path . dirname ( output ) )
105
+ }
106
+
100
107
// init & adjust watcher with postcss-import dependencies
101
108
let watcher
102
109
if ( config . watch ) {
You can’t perform that action at this time.
0 commit comments