Отзывы фрилансеров:
+ 2
- 0
Зарегистрирован на сайте 11 лет и 6 месяцев
Бюджет:
300 руб
3.85 $ — 3.31 €
Написать shell скрипт (bash), который будет пропускать все *_work.css и *_work.js файлы через yui-compressor и складывать их там же с тем же названием, но без "_work".
Например,
yui-compressor ./main_work.css -o ./main.css
./main_work.css ./main.css
yui-compressor ./js/jquery_work.js -o ./js/jquery.js
./js/jquery_work.js ./js/jquery.js
1) Входным параметром для скрипта должен быть путь для обработки, включая поддиректории. Если не указан, тогда ./
2) _work файлы должны оставаться на месте.
Gulp и Grunt не предлагать, нужен именно shell скрипт.
=======
Usage: yui-compressor [options] [input file]
Global Options
-h, --help Displays this information
--type Specifies the type of the input file
--charset Read the input file using
--line-break Insert a line break after the specified column number
-v, --verbose Display informational messages and warnings
-o Place the output into . Defaults to stdout.
Multiple files can be processed using the following syntax:
yui-compressor -o '.css$:-min.css' *.css
yui-compressor -o '.js$:-min.js' *.js
JavaScript Options
--nomunge Minify only, do not obfuscate
--preserve-semi Preserve all semicolons
--disable-optimizations Disable all micro optimizations
If no input file is specified, it defaults to stdin. In this case, the 'type'
option is required. Otherwise, the 'type' option is required only if the input
file extension is neither 'js' nor 'css'.
Разделы:
Опубликован:
21.12.2015 | 15:56
Заказ находится в архиве