-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Added Maxdepth Input Variable (#10)
* Added 'maxdepth' to Action's Inputs * Updated README to include latest Input
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ Minifies JS and CSS files with Babel-Minify and CleanCSS | |
| -- | -- | -- | -- | | ||
| directory | Directory that contains the files you want to minify. | false | . ( current directory ) | | ||
| output | Directory that contains the minified files. | false | same as directory | | ||
| maxdepth | Descend at most levels (a non-negative integer) levels of directories below the starting-points. | false | "" (empty) | | ||
|
||
> With the addition of `maxdepth`, the action traverses by default into all subdirectories in a specified directory. | ||
> | ||
> ##### [Follow this example if you want to minify the files in the first level of a certain directory.](#specifying-maxdepth) | ||
### Example | ||
|
||
|
@@ -30,6 +35,27 @@ steps: | |
branch: ${{ github.ref }} | ||
``` | ||
|
||
##### Specifying Maxdepth | ||
|
||
``` | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so auto-minify job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Auto Minify | ||
uses: nizarmah/auto-minify@master | ||
with: | ||
maxdepth: 1 | ||
# Auto commits minified files to the repository | ||
# Ignore it if you don't want to commit the files to the repository | ||
- name: Auto committing minified files | ||
uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: "Github Action: Auto Minified JS and CSS files" | ||
branch: ${{ github.ref }} | ||
``` | ||
|
||
##### Specifying output directory | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters