apply from: rootProject.file("gradle/node.gradle")


task buildMgmtLib(type: NpmTask, dependsOn: "npm_install",
  description: "Compile Mgmt Library") {
  args = ['run','build-mgmt-lib']
  enabled = !Boolean.getBoolean("skipClientBuild")
}

task buildManagementDev(type: NpmTask, dependsOn: "buildMgmtLib",
  description: "Compile Management development") {
  args = ['run','build-management-dev']
  enabled = !Boolean.getBoolean("skipClientBuild")
}

task buildManagement(type: NpmTask, dependsOn: "buildMgmtLib",
  description: "Compile Management") {
  args = ['run', 'build-management']
  enabled = !Boolean.getBoolean("skipClientBuild")
}

task buildDashboardDev(type: NpmTask, dependsOn: "buildMgmtLib",
  description: "Compile Dashboard development") {
  args = ['run', 'build-dashboard-dev']
  enabled = !Boolean.getBoolean("skipClientBuild")
}

task buildDashboard(type: NpmTask, dependsOn: "buildMgmtLib",
  description: "Compile Dashboard") {
  args = ['run', 'build-dashboard']
  enabled = !Boolean.getBoolean("skipClientBuild")
}

task buildClientDev {
  dependsOn(buildManagementDev,buildDashboardDev)
}

task buildClient {
  dependsOn(buildManagement,buildDashboard)
}

task ngLint(type: NpmTask, dependsOn: "npm_install",
  description: "Runs Angular TypeScript and HtML Linting") {
  args = ['run', 'lint']
}
