-
-
Notifications
You must be signed in to change notification settings - Fork 117
Add a new npx task to execute npm CLI tools thanks to the npx command #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1d04a05
Add a new npx task to execute npm CLI tools thanks to the npx command.
bsautel 81ad7e8
Improve the documentation.
bsautel 322b475
Add some input checks to the npx task.
bsautel a14653b
Extract the npx task test files to the resources source set.
bsautel 8a73d29
Declare some missing inputs in the npm task. Add an integration test …
bsautel ce5fd4d
Improve the up-to-date checking of the NodeTask.
bsautel 5dd50bf
Remove an invalid task output annotation.
bsautel 75b9f88
Remove some warnings regarding tasks inputs and outputs declaration.
bsautel bcdd252
Add a test to ensure the node task is not up-to-date when the script …
bsautel 90c59f5
Add some tests for the npx task.
bsautel 02b809f
Add some extra tests for the NpxTask. They cover all configuration op…
bsautel 3233240
Fix a broken test on Windows (path separator issue).
bsautel 56a0d84
Fix a broken test on Travis. The pcwd command copies the path to the …
bsautel 57d30ab
Add some tests for all options but execOverrides of the npm task. It …
bsautel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
30 changes: 30 additions & 0 deletions
30
src/main/groovy/com/moowork/gradle/node/npm/NpxExecRunner.groovy
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.moowork.gradle.node.npm | ||
|
||
import org.gradle.api.Project | ||
import org.gradle.api.tasks.Internal | ||
|
||
class NpxExecRunner | ||
extends NpmExecRunner | ||
{ | ||
public NpxExecRunner(Project project) { | ||
super(project) | ||
} | ||
|
||
@Override | ||
@Internal | ||
protected String getCommand() { | ||
return this.variant.npxExec | ||
} | ||
|
||
@Override | ||
@Internal | ||
protected File getLocalCommandScript() { | ||
return project.file(new File(this.ext.nodeModulesDir, 'node_modules/npm/bin/npx-cli.js')) | ||
} | ||
|
||
@Override | ||
@Internal | ||
protected String getCommandScript() { | ||
return this.variant.npxScriptFile | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.