@@ -9,34 +9,82 @@ Github action/CI Plugin to minify html, javascript and css files, using [minify]
99
1010## Usage
1111### Github Action
12- Please refer [ action.yml] ( action.yml ) for parameters.
12+ The following parameters can be set to configure the action.
13+
14+ * ** directory** - File to minify or a folder containing files to minify. By default, all files in current folder and
15+ its sub-folders will be minified
16+
17+ * ** output** - Path where the minified files will be saved. By default, the minified files will be saved in the
18+ original file path
19+
20+ * ** add_suffix** - Indicates if the output files should have the suffix ` .min ` added after the name. Default is true
1321
1422``` yaml
1523jobs :
1624 build :
1725 runs-on : ubuntu-latest # Docker-based github actions have to run on a linux environment
1826 steps :
1927 - name : HTML/CSS/JS Minifier
20- uses : docker://devatherock/minify-js:latest # To use a specific release, use a docker tag like 1.0.2 instead of latest
28+ uses : docker://devatherock/minify-js:1.0.2
2129 with :
2230 directory : ' src' # Optional
2331 output : ' minify/src' # Optional
2432 add_suffix : false # Optional
2533` ` `
2634
2735### Docker
36+
2837` ` ` shell
2938docker run --rm \
3039 -v "/path/to/files":/work \
3140 -w=/work \
3241 -e PARAMETER_INPUT_PATH=/work/src \
3342 -e PARAMETER_OUTPUT_PATH=/work/minify/src \
3443 -e PARAMETER_ADD_SUFFIX=false \
35- devatherock/minify-js:latest
44+ devatherock/minify-js:1.0.2
45+ ```
46+
47+ ### vela
48+ The following parameters can be set to configure the plugin.
49+
50+ * ** input_path** - File to minify or a folder containing files to minify. By default, all files in current folder and
51+ its sub-folders will be minified
52+
53+ * ** output_path** - Path where the minified files will be saved. By default, the minified files will be saved in the
54+ original file path
55+
56+ * ** add_suffix** - Indicates if the output files should have the suffix ` .min ` added after the name. Default is true
57+
58+ ``` yaml
59+ steps :
60+ - name : minify_js
61+ ruleset :
62+ branch : master
63+ event : push
64+ image : devatherock/minify-js:1.0.2
65+ parameters :
66+ input_path : src
67+ output_path : minify/src
68+ add_suffix : false
3669` ` `
3770
38- ### vela/CircleCI
39- Please refer [ docs] ( DOCS.md )
71+ ### CircleCI
72+
73+ ` ` ` yaml
74+ version : 2.1
75+ jobs :
76+ minify_js :
77+ docker :
78+ - image : devatherock/minify-js:1.0.2
79+ working_directory : ~/my-repo
80+ environment :
81+ PARAMETER_INPUT_PATH : src
82+ PARAMETER_OUTPUT_PATH : minify/src
83+ PARAMETER_ADD_SUFFIX : false
84+ steps :
85+ - checkout
86+ - run : sh /entrypoint.sh
87+ ` ` `
4088
4189## Tests
4290To test the latest plugin image, run the below command
0 commit comments