[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] src/scss: dart sass wouldn't watch if the _custom root was a symlink. ...
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]> Wed, 15 Jul 2026 18:33:06 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a57d2629fe6f_3719cad0-33d@gitlab-sidekiq-low-urgency-cpu-bound-v2-576d64547c-djpl9.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
6cb0eed9 by Benoit Grégoire at 2026-07-15T18:15:05+00:00
[FIX] src/scss: dart sass wouldn't watch if the _custom root was a symlink. ...
---
* [FIX] src/scss: dart sass wouldn't watch if the _custom root was a symlink. Target specific sudirectories to fix the problem and save on file watchers.
See merge request tikiwiki/tiki!10729
- - - - -
2 changed files:
- src/scss/package.json
- src/scss/scripts/check_custom.js
Changes:
=====================================
src/scss/package.json
=====================================
@@ -10,8 +10,8 @@
"test": "echo \"Error: no test specified\" && exit 1",
"prebuild": "node scripts/check_custom.js",
"prewatch": "node scripts/check_custom.js",
- "build": "sass --load-path=../../templates --load-path=../../themes ../../themes ../../_custom:../../public/generated/_custom --silence-deprecation=color-functions,global-builtin,import,if-function",
- "watch": "sass --watch --load-path=../../templates --load-path=../../themes ../../themes ../../_custom:../../public/generated/_custom --silence-deprecation=color-functions,global-builtin,import,if-function",
+ "build": "sass --load-path=../../templates --load-path=../../themes ../../themes ../../_custom/sites:../../public/generated/_custom/sites ../../_custom/shared/themes:../../public/generated/_custom/shared/themes --silence-deprecation=color-functions,global-builtin,import,if-function",
+ "watch": "sass --load-path=../../templates --load-path=../../themes ../../themes ../../_custom/sites:../../public/generated/_custom/sites ../../_custom/shared/themes:../../public/generated/_custom/shared/themes --silence-deprecation=color-functions,global-builtin,import,if-function --watch",
"clean": "git clean -f -x \"../../themes/**/*.css\" \"../../themes/**/*.css.map\" \"../../public/generated/_custom/**/*.css\" \"../../public/generated/_custom/**/*.css.map\""
},
"author": "",
=====================================
src/scss/scripts/check_custom.js
=====================================
@@ -1,5 +1,10 @@
-import fs from 'fs';
+import fs from "fs";
//If the _custom dir doesn't exist, the build will fail trying to watch a non-existent directory
-let p = "{__dirname}/../../../_custom";
-fs.mkdirSync(p, { recursive: true, mode: 0o774 });
+
+//This used to be _custom, but in the root _custom is a symlink, the build also failed. So we create and target the directories than can contain themes (and thus SCSS), which also saves on file watchers.
+let paths = ["{__dirname}/../../../_custom/shared/themes", "{__dirname}/../../../_custom/sites"];
+
+for (const path of paths) {
+ fs.mkdirSync(path, { recursive: true, mode: 0o774 });
+}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/6cb0eed950e1815c24afad3b09cabd1abbaa691b
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/6cb0eed950e1815c24afad3b09cabd1abbaa691b
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs