srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
866 stars 211 forks source link

Make yarn easier to use #265

Open chrislong opened 6 years ago

chrislong commented 6 years ago

It would be a lot more convenient to use yarn if it were easier to add command line arguments. For example, for "yard add". I saw it was possible by defining a new task, but that's really heavyweight.

Stummi commented 6 years ago

Hey, I am currently struggling trying to do this. Can you share an example how you did it please?

Edit: Nevermind, I think I got it. I am not very experienced with gradle at all, so I hope I got it correctly

task yarnBuild(type:Exec, dependsOn: 'yarn' ) {
    commandLine '.gradle/yarn/yarn-latest/bin/yarn', 'build', '--prod'
}