node-gradle / node-gradle/gradle-node-plugin
Bug: npx tailwindcss with args --watch
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 677
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Description
Hi, I tried to execute the following task (go to reproduce the error for more details) and the problem is when I added --watch in args, when I add this command, it did not work, I don´t know why does this happens, Is there a bug when I execute some command with --watch like ng server --watch or similar? I tried to, execute Spring boot application and execute tailwind in parallel because I used thymeleaf.
Note: I clarify that the command does work if I remove the --watch, but I want the file to be pending changes
Reproduce error
1 -- I made a task in build.gradle
tasks.register('frontend', NpxTask) {
command = 'tailwindcss'
ignoreExitValue = true
inputs.files('package.json', 'package-lock.json', 'tailwind.config.js', 'postcss.config.js')
inputs.files(fileTree('./src/main/resources/static'))
inputs.files(fileTree('./src/main/resources/templates'))
outputs.dir('./build/resources')
dependsOn('npmInstall')
args = ['-i', './src/main/resources/static/css/tailwind.css', '-o', './src/main/resources/static/css/tailwind.min.css', '--watch']
}
2 -- I run gradle frontend
3 -- I saw to next response
22:02:28: Executing 'clean frontend'...
> Task :clean
> Task :nodeSetup UP-TO-DATE
> Task :npmSetup SKIPPED
> Task :npmInstall UP-TO-DATE
> Task :frontend
BUILD SUCCESSFUL in 1s
4 actionable tasks: 2 executed, 2 up-to-date
22:02:30: Execution finished 'clean frontend'.
Expected behavior
I expected to generate the file tailwind.min.js in /src/main/resources/static/css/tailwind.min.css.
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 the frontend task in build.gradle and run gradle frontend using the listed Tailwind CSS arguments, comparing it with the command without --watch. Check the task output and the expected static/css/tailwind.min.css path; done means the reported watch invocation behaves as intended and produces the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, tailwindcss
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100