You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -116,21 +116,21 @@ clean-css-cli 4.3 introduces the following changes / features:
116
116
## CLI options
117
117
118
118
```shell
119
-
-h, --help output usage information
120
-
-v, --version output the version number
121
119
-b, --batch If enabled, optimizes input files one by one instead of joining them together
122
120
-c, --compatibility [ie7|ie8] Force compatibility mode (see Readme for advanced examples)
123
121
-d, --debug Shows debug information (minification time& compression efficiency)
124
122
-f, --format <options> Controls output formatting, see examples below
123
+
-h, --help output usage information
125
124
-o, --output [output-file] Use [output-file] as output instead of STDOUT
126
125
-O <n> [optimizations] Turn on level <n> optimizations; optionally accepts a list of fine-grained options, defaults to `1`, IMPORTANT: the prefix is O (a capital o letter), NOT a 0 (zero, a number)
126
+
-v, --version output the version number
127
127
--inline [rules] Enables inlining for listed sources (defaults to `local`)
128
128
--inline-timeout [seconds] Per connection timeout when fetching remote stylesheets (defaults to 5 seconds)
129
+
--input-source-map [file] Specifies the path of the input source map file
129
130
--remove-inlined-files Remove files inlined in<source-file ...> or via `@import` statements
Copy file name to clipboardExpand all lines: index.js
+26-75
Original file line number
Diff line number
Diff line change
@@ -21,100 +21,51 @@ function cli(process, beforeMinifyCallback) {
21
21
22
22
// Specify commander options to parse command line params correctly
23
23
program
24
-
.version(buildVersion,'-v, --version')
25
24
.usage('[options] <source-file ...>')
26
25
.option('-b, --batch','If enabled, optimizes input files one by one instead of joining them together')
27
26
.option('-c, --compatibility [ie7|ie8]','Force compatibility mode (see Readme for advanced examples)')
28
27
.option('-d, --debug','Shows debug information (minification time & compression efficiency)')
29
28
.option('-f, --format <options>','Controls output formatting, see examples below')
29
+
.option('-h, --help','display this help')
30
30
.option('-o, --output [output-file]','Use [output-file] as output instead of STDOUT')
31
31
.option('-O <n> [optimizations]','Turn on level <n> optimizations; optionally accepts a list of fine-grained options, defaults to `1`, see examples below, IMPORTANT: the prefix is O (a capital o letter), NOT a 0 (zero, a number)',function(val){returnMath.abs(parseInt(val));})
32
+
.version(buildVersion,'-v, --version')
32
33
.option('--batch-suffix <suffix>','A suffix (without extension) appended to input file name when processing in batch mode (`-min` is the default)','-min')
33
34
.option('--inline [rules]','Enables inlining for listed sources (defaults to `local`)')
34
35
.option('--inline-timeout [seconds]','Per connection timeout when fetching remote stylesheets (defaults to 5 seconds)',parseFloat)
36
+
.option('--input-source-map [file]','Specifies the path of the input source map file')
35
37
.option('--remove-inlined-files','Remove files inlined in <source-file ...> or via `@import` statements')
36
-
.option('--with-rebase','Enable URLs rebasing')
37
38
.option('--source-map','Enables building input\'s source map')
console.log(' %> # `breaks` controls where to insert breaks');
55
-
console.log(' %> # `afterAtRule` controls if a line break comes after an at-rule; e.g. `@charset`; defaults to `off` (alias to `false`); accepts number of line breaks as an argument too');
56
-
console.log(' %> # `afterBlockBegins` controls if a line break comes after a block begins; e.g. `@media`; defaults to `off`; accepts number of line breaks as an argument too');
57
-
console.log(' %> # `afterBlockEnds` controls if a line break comes after a block ends, defaults to `off`; accepts number of line breaks as an argument too');
58
-
console.log(' %> # `afterComment` controls if a line break comes after a comment; defaults to `off`; accepts number of line breaks as an argument too');
59
-
console.log(' %> # `afterProperty` controls if a line break comes after a property; defaults to `off`; accepts number of line breaks as an argument too');
60
-
console.log(' %> # `afterRuleBegins` controls if a line break comes after a rule begins; defaults to `off`; accepts number of line breaks as an argument too');
61
-
console.log(' %> # `afterRuleEnds` controls if a line break comes after a rule ends; defaults to `off`; accepts number of line breaks as an argument too');
62
-
console.log(' %> # `beforeBlockEnds` controls if a line break comes before a block ends; defaults to `off`; accepts number of line breaks as an argument too');
63
-
console.log(' %> # `betweenSelectors` controls if a line break comes between selectors; defaults to `off`; accepts number of line breaks as an argument too');
64
-
console.log(' %> # `indentBy` controls number of characters to indent with; defaults to `0`');
65
-
console.log(' %> # `indentWith` controls a character to indent with, can be `space` or `tab`; defaults to `space`');
66
-
console.log(' %> # `spaces` controls where to insert spaces');
67
-
console.log(' %> # `aroundSelectorRelation` controls if spaces come around selector relations; e.g. `div > a`; defaults to `off`');
68
-
console.log(' %> # `beforeBlockBegins` controls if a space comes before a block begins; e.g. `.block {`; defaults to `off`');
69
-
console.log(' %> # `beforeValue` controls if a space comes before a value; e.g. `width: 1rem`; defaults to `off`');
70
-
console.log(' %> # `wrapAt` controls maximum line length; defaults to `off`');
console.log(' %> # `removeEmpty` controls removing empty rules and nested blocks; defaults to `on` (since 4.1.0)');
115
-
console.log(' %> # `removeUnusedAtRules` controls unused at rule removing; defaults to `off` (since 4.1.0)');
116
-
console.log(' %> # `restructureRules` controls rule restructuring; defaults to `off`');
117
-
console.log(' %> # `skipProperties` controls which properties won\'t be optimized, defaults to empty list which means all will be optimized (since 4.1.0)');
0 commit comments