refactor to package the Vue components into the JAR instead of copying files around
This commit is contained in:
@@ -2,8 +2,28 @@ plugins {
|
||||
id "com.github.node-gradle.node" version "2.2.4"
|
||||
}
|
||||
|
||||
task build(type: NpmTask) {
|
||||
apply plugin: 'java'
|
||||
|
||||
group = 'io.reflectoring'
|
||||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = '11'
|
||||
|
||||
task npmBuild(type: NpmTask) {
|
||||
inputs.dir("src")
|
||||
outputs.dir("dist")
|
||||
args = ['run', 'build']
|
||||
}
|
||||
}
|
||||
|
||||
task npmClean(type: NpmTask) {
|
||||
args = ['run', 'clean']
|
||||
}
|
||||
|
||||
jar {
|
||||
into '/static', {
|
||||
from 'dist'
|
||||
include '**/*.umd.min.js'
|
||||
}
|
||||
}
|
||||
|
||||
jar.dependsOn('npmBuild')
|
||||
clean.dependsOn('npmClean')
|
||||
@@ -5,6 +5,7 @@
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build --target lib --dest dist/WeekChart --name WeekChart src/components/WeekChart.vue",
|
||||
"clean": "rm -rf dist",
|
||||
"lint": "vue-cli-service lint",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook",
|
||||
|
||||
Reference in New Issue
Block a user