File tree Expand file tree Collapse file tree 4 files changed +21
-7
lines changed Expand file tree Collapse file tree 4 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ all: clean lint test
33lint :
44 ./node_modules/.bin/jshint * .js
55
6- TESTS = opts source-maps source-maps-file stdout stdin config config-all js-config js-config-all invalid warning
6+ TESTS = opts source-maps source-maps-file stdout stdin config config-all config-wildcard js-config js-config-all invalid warning
77
88
99DIFF = diff -q
@@ -80,6 +80,10 @@ test/build/config-all.css: test/in.css
8080 ./bin/postcss -c test/config-all.json
8181 $(DIFF ) $@ $(subst build,ref,$@ )
8282
83+ test/build/config-wildcard.css : test/in.css
84+ ./bin/postcss -c test/config-wildcard.json
85+ $(DIFF ) $@ $(subst build,ref,$@ )
86+
8387test/build/js-config.css : test/in.css
8488 ./bin/postcss -u postcss-url -c test/config.js -o $@ $<
8589 $(DIFF ) $@ $(subst build,ref,$@ )
Original file line number Diff line number Diff line change @@ -83,13 +83,11 @@ if (argv.use.indexOf("postcss-import") !== -1) {
8383 }
8484}
8585
86- var inputFiles = globby . sync ( argv . _ ) ;
86+ var inputFiles = argv . _ . length ? argv . _ : argv . input ;
87+ inputFiles = globby . sync ( inputFiles ) ;
8788if ( ! inputFiles . length ) {
88- if ( argv . input ) {
89- inputFiles = Array . isArray ( argv . input ) ? argv . input : [ argv . input ] ;
90- } else { // use stdin if nothing else is specified
91- inputFiles = [ undefined ] ;
92- }
89+ // use stdin if nothing else is specified
90+ inputFiles = [ undefined ] ;
9391}
9492if ( inputFiles . length > 1 && ! argv . dir && ! argv . replace ) {
9593 throw 'Please specify either --replace or --dir [output directory] for your files' ;
Original file line number Diff line number Diff line change 1+ {
2+ "use" : " postcss-url" ,
3+ "input" : " test/i?.css" ,
4+ "output" : " test/build/config-wildcard.css" ,
5+ "postcss-url" : {
6+ "url" : " inline"
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ body {
2+ background : url (data:image/png;base64, bm90IHJlYWxseSBhbiBpbWFnZQo=);
3+ display : flex;
4+ }
You can’t perform that action at this time.
0 commit comments