Skip to content

NPM run tasks with pre and/or post do not properly run #146

@gkohen

Description

@gkohen

Hi,

As we started to use more NPM scripts with version 2.12, we've noticed some issues for this task:

task e2eTestWebApp(type: NpmTask) {
    outputs.upToDateWhen { false };
    args = ['run', 'e2e']
}

In package.json we have the following scripts:

    "e2e": "npm run protractor",
    "pree2e": "npm run webdriver:update -- --standalone"

When running npm run e2e from command line, it properly. That is it runs pree2e script and then the e2e one.
When doing the same through the Gradle task above, it shows on the console the following commands:

npm run protractor
npm run webdriver:update -- --standalone

But the commands do not actually execute (no-op for both). I wonder if the blame is on the the way the gradle plugin runs NPM with npm_cli.js

Considering NPM scripts is becoming a prominent way of building web apps, it would be good if we can have some more tests/support to NPM run.

Thanks for a great plugin, by the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions