diff --git a/AnimalRequests/package.json b/AnimalRequests/package.json index 0327b86ce..2d4a78e53 100644 --- a/AnimalRequests/package.json +++ b/AnimalRequests/package.json @@ -84,7 +84,7 @@ } }, "clean": { - "command": "rimraf resources/web/animalrequests/gen ; rimraf node_modules" + "command": "rimraf resources/web/AnimalRequests/gen ; rimraf node_modules" }, "build-jest-test": { "command": "jest", diff --git a/AnimalRequests/webpack.config.js b/AnimalRequests/webpack.config.js index bb5e26f33..da25fb460 100644 --- a/AnimalRequests/webpack.config.js +++ b/AnimalRequests/webpack.config.js @@ -28,7 +28,7 @@ module.exports = [function wp() { library: 'AnimalRequests', libraryExport: 'default', libraryTarget: 'umd', - path: path.resolve(__dirname, 'resources/web/animalrequests/gen/') + path: path.resolve(__dirname, 'resources/web/AnimalRequests/gen/') }, resolve: { extensions: ['.ts', '.tsx', '.js', '.json', '.css'], diff --git a/AnimalRequests/webpack/dev-style.config.js b/AnimalRequests/webpack/dev-style.config.js index f35f0bc0f..bf8b6eefa 100644 --- a/AnimalRequests/webpack/dev-style.config.js +++ b/AnimalRequests/webpack/dev-style.config.js @@ -11,7 +11,7 @@ module.exports = { }, output: { - path: path.resolve(__dirname, '../resources/web/animalrequests/app/'), + path: path.resolve(__dirname, '../resources/web/AnimalRequests/gen/'), publicPath: '/', filename: 'style.js' // do not override app.js }, @@ -48,4 +48,4 @@ module.exports = { filename: '[name].css' }) ] -}; \ No newline at end of file +}; diff --git a/AnimalRequests/webpack/dev.config.js b/AnimalRequests/webpack/dev.config.js index 5f35ee140..e6c840c42 100644 --- a/AnimalRequests/webpack/dev.config.js +++ b/AnimalRequests/webpack/dev.config.js @@ -16,7 +16,7 @@ module.exports = { }, output: { - path: path.resolve(__dirname, '../resources/web/animalrequests/app/'), + path: path.resolve(__dirname, '../resources/web/AnimalRequests/gen/'), publicPath: 'http://localhost:3000/', filename: '[name].js' }, diff --git a/AnimalRequests/webpack/prod.config.js b/AnimalRequests/webpack/prod.config.js index 9855e0b8b..8260faff5 100644 --- a/AnimalRequests/webpack/prod.config.js +++ b/AnimalRequests/webpack/prod.config.js @@ -47,8 +47,7 @@ module.exports = { }, output: { - path: path.resolve(__dirname, '../resources/web/animalrequests/gen/app/'), - //path: path.resolve(__dirname, '../../WNPRC_EHR/resources/web/wnprc_ehr/reactjs/animalrequests/'), + path: path.resolve(__dirname, '../resources/web/AnimalRequests/gen/'), publicPath: './', // allows context path to resolve in both js/css filename: "[name].js" }, diff --git a/WNPRC_EHR/build.gradle b/WNPRC_EHR/build.gradle index 02ad79cae..d4040e187 100644 --- a/WNPRC_EHR/build.gradle +++ b/WNPRC_EHR/build.gradle @@ -49,3 +49,9 @@ configurations.all { force "com.google.http-client:google-http-client:${googleHttpClientVersion}" } } + +// Declare atypical npm build output directory for Gradle to correctly cache output +List.of(project.tasks.named("npm_run_build-prod"), project.tasks.named("npm_run_build")) + .forEach(task -> task.configure { + outputs.dir(project.file("./resources/web/wnprc_ehr/gen")) + }) diff --git a/WNPRC_EHR/package.json b/WNPRC_EHR/package.json index 69717a6a1..7ae9d6a60 100644 --- a/WNPRC_EHR/package.json +++ b/WNPRC_EHR/package.json @@ -12,7 +12,7 @@ "build-storybook": "build-storybook", "build": "better-npm-run build", "build-prod": "better-npm-run build-prod", - "clean": "rm -rf resources/web/gen; rm -rf resources/views/gen" + "clean": "rm -rf resources/web/wnprc_ehr/gen; rm -rf resources/views/gen" }, "keywords": [], "author": "",