node-gradle / node-gradle/gradle-node-plugin
Allow NodeTask to be extended and exec to be overridden.
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 677
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
In https://github.com/node-gradle/gradle-node-plugin/blob/main/src/main/kotlin/com/github/gradle/node/task/NodeTask.kt#L90-L99 exec is not defined as an open method, which means that tasks that extend this cannot add functionality during the execution.
In our specific case, we are using node to run SCSS, and so want to clean the target directory before calling node to populate it. I can add a second TaskAction, but there is no guarantee that this will run first, which means that sometimes I delete everything after it has been generated. Which is also not the point ;-)
I can, of course, just delegate everything, that involves a lot of boilerplate, since the there quite a few properties that should be delegated across..
So, would it be possible to make exec an open method?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/kotlin/com/github/gradle/node/task/NodeTask.kt around lines 90-99 and inspect how the task execution action invokes exec. Confirm that subclasses can customize execution before Node runs, and verify the change without requiring delegation of all existing properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, nodejs
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100