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
{{ message }}
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.
I have a need to run multiple (many) CombineJs and MinifyJs-operations, and would like to not have to create a separate task for each, instead doing something like shown below:
I did not find an easier way, but I might be wrong...
Would you be interested in adding such functionality (e.g. would you want a pull-request)?
task js2 {
// This worksnewcom.eriwen.gradle.js.JsMinifier().minifyJsFile (
file("target/build/iknowbase/iknowbase-full.js"),
[] asSet<File>,
file("target/build/iknowbase/iknowbase-full.min.js"),
project.closure.compilerOptions, project.closure.warningLevel, project.closure.compilationLevel
)
// Maybe something like this should work?com.eriwen.gradle.js.JsMinifier.minifyJs {
source = file (...)
dest = file (...)
}
}
The text was updated successfully, but these errors were encountered:
@elygre Actually, the plugin used to work in such a way that one could specify multiple sets of inputs, but that was too confusing for users so I removed it.
You aren't the first person to bring this up, so perhaps we should write new tasks that accomplish this behavior. I would be more than happy to accept a pull request with suggestions.
If you're not keen on that, here is how you can create tasks dynamically to do what you ask:
My groovy isn't good enough to really know what is the best way of implementing stuff. But, for a start, what do you think about the code at https://gist.github.com/7fb3bda12a0a196e4fd3?
I'm thinking that another way would be to create a function taking only a closure, but I don't know quite how to do that properly...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a need to run multiple (many) CombineJs and MinifyJs-operations, and would like to not have to create a separate task for each, instead doing something like shown below:
The text was updated successfully, but these errors were encountered: