Skip to content

Commit

Permalink
Move Webpack build to the same Maven module from which it is invoked (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Oct 12, 2024
1 parent d0d0cc8 commit 4d2698f
Show file tree
Hide file tree
Showing 147 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@

# Yarn
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
/war/.yarn/plugins/** binary
/.yarn/plugins/** binary
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ node/
.git

# libraries / external deps / generated files
war/src/main/js/plugin-setup-wizard/bootstrap-detached.js
src/main/js/plugin-setup-wizard/bootstrap-detached.js
war/src/main/webapp/scripts/yui
war/src/main/webapp/jsbundles/
war/src/main/scss/_bootstrap.scss
src/main/scss/_bootstrap.scss

# test files that we don't need formatted
test/src/test/resources
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: "stylelint-config-standard",
customSyntax: "postcss-scss",
ignoreFiles: ["war/src/main/scss/_bootstrap.scss"],
ignoreFiles: ["src/main/scss/_bootstrap.scss"],
rules: {
"no-descending-specificity": null,
"selector-class-pattern": "[a-z]",
Expand Down
6 changes: 3 additions & 3 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = [
// External scripts
".pnp.cjs",
".pnp.loader.mjs",
"war/src/main/js/plugin-setup-wizard/bootstrap-detached.js",
"src/main/js/plugin-setup-wizard/bootstrap-detached.js",
"war/src/main/webapp/scripts/yui/*",
],
},
Expand Down Expand Up @@ -91,8 +91,8 @@ module.exports = [
{
files: [
"eslint.config.cjs",
"war/postcss.config.js",
"war/webpack.config.js",
"postcss.config.js",
"webpack.config.js",
".stylelintrc.js",
],
languageOptions: {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
},
"private": true,
"scripts": {
"dev": "webpack --config war/webpack.config.js",
"prod": "webpack --config war/webpack.config.js --mode=production",
"dev": "webpack --config webpack.config.js",
"prod": "webpack --config webpack.config.js --mode=production",
"build": "yarn prod",
"start": "yarn dev --watch",
"lint:js": "eslint . && prettier --check .",
"lint:js-ci": "eslint . -f checkstyle -o target/eslint-warnings.xml && prettier --check .",
"lint:css": "stylelint war/src/main/scss",
"lint:css-ci": "stylelint war/src/main/scss --custom-formatter stylelint-checkstyle-reporter -o target/stylelint-warnings.xml",
"lint:css": "stylelint src/main/scss",
"lint:css-ci": "stylelint src/main/scss --custom-formatter stylelint-checkstyle-reporter -o target/stylelint-warnings.xml",
"lint:ci": "yarn lint:js-ci && yarn lint:css-ci",
"lint:fix": "eslint --fix . && prettier --write . && stylelint war/src/main/scss --fix",
"lint:fix": "eslint --fix . && prettier --write . && stylelint src/main/scss --fix",
"lint": "yarn lint:js && yarn lint:css"
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions war/webpack.config.js → webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = (env, argv) => ({
styles: [path.join(__dirname, "src/main/scss/styles.scss")],
},
output: {
path: path.join(__dirname, "src/main/webapp/jsbundles"),
path: path.join(__dirname, "war/src/main/webapp/jsbundles"),
},
devtool:
argv.mode === "production"
Expand Down Expand Up @@ -89,7 +89,7 @@ module.exports = (env, argv) => ({
options: {
sourceMap: true,
// ignore the URLS on the base styles as they are picked
// from the src/main/webapp/images dir
// from the war/src/main/webapp/images dir
url: {
filter: (url, resourcePath) => {
return !resourcePath.includes("styles.scss");
Expand Down

0 comments on commit 4d2698f

Please sign in to comment.