build.gradle 523 B

123456789101112131415161718192021222324252627
  1. plugins {
  2. id "com.moowork.node" version "1.2.0"
  3. }
  4. node {
  5. download = true
  6. }
  7. yarn {
  8. args = ['--registry', 'https://registry.npm.taobao.org']
  9. }
  10. task npmRunDev(group: 'npm', type: NpmTask, dependsOn: yarn) {
  11. args = ["run", "dev"]
  12. }
  13. task npmRunBuild(group: 'npm', type: NpmTask, dependsOn: yarn) {
  14. args = ["run", "build"]
  15. }
  16. task yarnRunDev(group: 'yarn', type: YarnTask, dependsOn: yarn) {
  17. args = ["run", "dev"]
  18. }
  19. task yarnRunBuild(group: 'yarn', type: YarnTask, dependsOn: yarn) {
  20. args = ["run", "build"]
  21. }