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 11
22- Fixed: replacement of ` postcss-log-warnings ` (deprecated) by ` postcss-reporter `
33([ #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 ) )
49
510# 1.7.1 - 2015-06-19
611
Original file line number Diff line number Diff line change 3232 "commander" : " ^2.3.0" ,
3333 "cssnano" : " ^2.0.1" ,
3434 "exit" : " ^0.1.2" ,
35+ "mkdirp" : " ^0.5.1" ,
3536 "pixrem" : " ^1.1.0" ,
3637 "pleeease-filters" : " ^1.0.0" ,
3738 "postcss" : " ^4.0.2" ,
Original file line number Diff line number Diff line change @@ -35,6 +35,25 @@ test("cli", function(t) {
3535 )
3636 planned += 1
3737
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+
3857 exec ( cssnextBin + " src/__tests__/fixtures/cli.css" , function ( err , stdout ) {
3958 if ( err ) {
4059 throw err
Original file line number Diff line number Diff line change 44
55body {
66 color : var (--red );
7+ background : url (url);
78}
Original file line number Diff line number Diff line change 11body {
22 color : # e00 ;
3+ background : url (url);
34}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import path from "path"
88// we will this instead of process.exit()
99import exit from "exit"
1010
11+ import mkdirp from "mkdirp"
1112import color from "chalk"
1213import program from "commander"
1314
@@ -97,6 +98,12 @@ if (input && !fs.existsSync(input)) {
9798}
9899
99100config . from = input
101+ config . to = output
102+
103+ if ( output ) {
104+ mkdirp . sync ( path . dirname ( output ) )
105+ }
106+
100107// init & adjust watcher with postcss-import dependencies
101108let watcher
102109if ( config . watch ) {
You can’t perform that action at this time.
0 commit comments