Skip to content

Commit 86f7c38

Browse files
committed
add documentation on Fano CLI CSS minifier
1 parent a02e6d4 commit 86f7c38

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

scaffolding-with-fano-cli/index.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ With `[path]` empty, it will scan current directory for any JavaScript files and
224224
$ fanocli --jsmin
225225
```
226226

227-
With `[path]` not empty, if it is directory, it will scan that directory for any JavaScript files and minify them and output as new file with name using original file name appended with `min.js`. If `[path]` is single file, it minify it and create new file with same name appended with `min.js`.
227+
With `[path]` not empty, if it is directory, it scans that directory for any JavaScript files and minifies them and output as new file with name using original file name appended with `min.js`. If `[path]` is single file, it minifies it and create new file with same name appended with `min.js`.
228228

229229
```
230230
$ fanocli --jsmin=/path/to/js
@@ -236,12 +236,40 @@ If you specify optional `--output=[target-path]` parameter, then `[target-path]`
236236
$ fanocli --jsmin=/path/to/js --output=/path/to/js/scripts.min.js
237237
```
238238

239-
If `[target-path]` equals `stdout`, minify output is printed to STDOUT.
239+
If `[target-path]` equals `stdout`, minified output is printed to STDOUT.
240240

241241
```
242242
$ fanocli --jsmin=/path/to/js --output=stdout
243243
```
244244

245+
## <a name="minify-css"></a> Minify CSS files
246+
247+
To reduce CSS file size, run with `--cssmin=[path]` command line options.
248+
249+
With `[path]` empty, it will scan current directory for any CSS files and minify them and output as new file with name using original file name appended with `min.css`.
250+
251+
```
252+
$ fanocli --cssmin
253+
```
254+
255+
With `[path]` not empty, if it is directory, it scans that directory for any CSS files and minifies them and output as new file with name using original file name appended with `min.css`. If `[path]` is single file, it minifies it and create new file with same name appended with `min.css`.
256+
257+
```
258+
$ fanocli --cssmin=/path/to/css
259+
```
260+
261+
If you specify optional `--output=[target-path]` parameter, then `[target-path]` will be used as its filename.
262+
263+
```
264+
$ fanocli --cssmin=/path/to/css --output=/path/to/css/styles.min.css
265+
```
266+
267+
If `[target-path]` equals `stdout`, minified output is printed to STDOUT.
268+
269+
```
270+
$ fanocli --cssmin=/path/to/css --output=stdout
271+
```
272+
245273
## <a name="add-session-support"></a>Add session support
246274

247275
Any [project creation commands](/scaffolding-with-fano-cli/creating-project), i.e, `--project*` commands, accept additional parameter `--with-session=[session storage]` where `session storage` value can be one of following value

0 commit comments

Comments
 (0)