Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/jquery.module.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/table_settings.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A built file (public/js/table_settings.js) should not change without its source counterpart (src/App/assets/js/components/_table_settings.js).

Also, the changes seem odd:

  • previously: ...resource),n=e(#btn-delete-resource);!t||!n||(e...`
  • now: ...resource),n=e(#btn-delete-resource);t&&n&&(e...`

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 14 additions & 7 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Assets are compiled from src/App/assets into the public directory:
* js/*.js - one file per entry below, plus the shared js/vendor.js
* css/app.css - compiled from scss/index.scss (imported by js/index.js)
* fonts/* - emitted for every font referenced by the stylesheets
* images/app/ - copied verbatim from App/assets/images
* fonts/* - copied from App/assets/fonts, keeping nested folders
* images/app/ - copied from App/assets/images, keeping nested folders
*
* So please, DO NOT MANUALLY ADD ASSETS TO THE PUBLIC DIRECTORY!
*/
Expand All @@ -18,6 +18,7 @@ import path from 'path';
const projectRoot = import.meta.dirname;

const assetsPath = 'App/assets';
const fontsPath = `${assetsPath}/fonts`;
const imagesPath = `${assetsPath}/images`;

/*
Expand Down Expand Up @@ -65,13 +66,19 @@ export default defineConfig(({ mode }) => {
plugins: [
viteStaticCopy({
targets: [
{
src: `${fontsPath}/**/*`,
dest: 'fonts',
// **/* matches nested files. stripBase: 3 drops
// App/assets/fonts so icons/fontawesome/... stays intact.
rename: { stripBase: 3 },
},
{
src: `${imagesPath}/**/*`,
dest: 'images/app',
// Globs only match files, so the images directory has to
// be walked recursively and its leading path segments
// dropped to keep the nested directories intact.
rename: { stripBase: imagesPath.split('/').length },
dest: 'images/app/',
// Same idea for images: drop App/assets/images, keep
// favicon/, flags/, icon/, and the rest of the tree.
rename: { stripBase: 3 },
},
],
}),
Expand Down
Loading