ultimate-jekyll-manager 0.0.299 → 0.0.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +28 -0
- package/README.md +28 -1
- package/package.json +3 -3
package/CLAUDE.md
CHANGED
|
@@ -259,6 +259,34 @@ That's it! No HTML needed. The UJ pricing layout reads `page.resolved.pricing` a
|
|
|
259
259
|
|
|
260
260
|
**Asset Loading:** Page-specific CSS/JS files are automatically included based on the page's canonical path. Override with `asset_path` frontmatter.
|
|
261
261
|
|
|
262
|
+
### Webpack Import Aliases
|
|
263
|
+
|
|
264
|
+
UJM defines two webpack aliases (in `src/gulp/tasks/webpack.js`) for importing assets in JavaScript:
|
|
265
|
+
|
|
266
|
+
| Alias | Resolves To | Purpose |
|
|
267
|
+
|-------|------------|---------|
|
|
268
|
+
| `__main_assets__` | `[UJM package]/dist/assets` | UJM's own built-in assets (core modules, libraries, pages) |
|
|
269
|
+
| `__project_assets__` | `[consuming project]/src/assets` | The consuming project's custom assets |
|
|
270
|
+
|
|
271
|
+
**`__main_assets__`** — Import UJM libraries and core modules:
|
|
272
|
+
```javascript
|
|
273
|
+
import { FormManager } from '__main_assets__/js/libs/form-manager.js';
|
|
274
|
+
import authorizedFetch from '__main_assets__/js/libs/authorized-fetch.js';
|
|
275
|
+
import { getPrerenderedIcon } from '__main_assets__/js/libs/prerendered-icons.js';
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**`__project_assets__`** — Import consuming project's own assets:
|
|
279
|
+
```javascript
|
|
280
|
+
// Used in src/index.js to load project-specific page modules
|
|
281
|
+
import(`__project_assets__/js/pages/${pageModulePath}`)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**How they work together:** `src/index.js` loads page modules from both aliases — first from `__main_assets__` (UJM defaults), then from `__project_assets__` (project overrides/extensions). If a project module doesn't exist, it gracefully skips. This enables a layered system where UJM provides defaults and consuming projects can extend or override page behavior.
|
|
285
|
+
|
|
286
|
+
**When to use which:**
|
|
287
|
+
- **`__main_assets__`** — When importing UJM-provided libraries, core modules, or referencing UJM's built-in page scripts
|
|
288
|
+
- **`__project_assets__`** — When a consuming project needs to import its own custom assets from within UJM-managed code
|
|
289
|
+
|
|
262
290
|
### Page Module Structure
|
|
263
291
|
|
|
264
292
|
All page modules must follow this standardized pattern:
|
package/README.md
CHANGED
|
@@ -723,7 +723,34 @@ Internal tracking system modeled after UTM for cross-property user journey track
|
|
|
723
723
|
* Language
|
|
724
724
|
* https://www.freepik.com/icon/language_484531#fromView=family&page=1&position=0&uuid=651a2f0f-9023-4063-a495-af9a4ef72304
|
|
725
725
|
|
|
726
|
-
### Webpack
|
|
726
|
+
### Webpack Import Aliases
|
|
727
|
+
|
|
728
|
+
UJM defines two webpack aliases (in `src/gulp/tasks/webpack.js`) for importing assets in JavaScript:
|
|
729
|
+
|
|
730
|
+
| Alias | Resolves To | Purpose |
|
|
731
|
+
|-------|------------|---------|
|
|
732
|
+
| `__main_assets__` | `[UJM package]/dist/assets` | UJM's own built-in assets (core modules, libraries, pages) |
|
|
733
|
+
| `__project_assets__` | `[consuming project]/src/assets` | The consuming project's custom assets |
|
|
734
|
+
|
|
735
|
+
**`__main_assets__`** — Import UJM libraries and core modules:
|
|
736
|
+
```javascript
|
|
737
|
+
import { FormManager } from '__main_assets__/js/libs/form-manager.js';
|
|
738
|
+
import authorizedFetch from '__main_assets__/js/libs/authorized-fetch.js';
|
|
739
|
+
import { getPrerenderedIcon } from '__main_assets__/js/libs/prerendered-icons.js';
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
**`__project_assets__`** — Import consuming project's own assets:
|
|
743
|
+
```javascript
|
|
744
|
+
// Used in src/index.js to load project-specific page modules
|
|
745
|
+
import(`__project_assets__/js/pages/${pageModulePath}`)
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
**How they work together:** `src/index.js` loads page modules from both aliases — first from `__main_assets__` (UJM defaults), then from `__project_assets__` (project overrides/extensions). If a project module doesn't exist, it gracefully skips. This enables a layered system where UJM provides defaults and consuming projects can extend or override page behavior.
|
|
749
|
+
|
|
750
|
+
**When to use which:**
|
|
751
|
+
- **`__main_assets__`** — When importing UJM-provided libraries, core modules, or referencing UJM's built-in page scripts
|
|
752
|
+
- **`__project_assets__`** — When a consuming project needs to import its own custom assets from within UJM-managed code
|
|
753
|
+
|
|
727
754
|
## Dev Flags
|
|
728
755
|
Add this to any js file to ONLY run in development mode (it will be excluded in production builds):
|
|
729
756
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultimate-jekyll-manager",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.301",
|
|
4
4
|
"description": "Ultimate Jekyll dependency manager",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"cheerio": "^1.2.0",
|
|
78
78
|
"chrome-launcher": "^1.2.1",
|
|
79
79
|
"dotenv": "^17.3.1",
|
|
80
|
-
"fast-xml-parser": "^5.5.
|
|
80
|
+
"fast-xml-parser": "^5.5.2",
|
|
81
81
|
"fs-jetpack": "^5.1.0",
|
|
82
82
|
"glob": "^13.0.6",
|
|
83
83
|
"gulp-clean-css": "^4.3.0",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"sass": "^1.98.0",
|
|
102
102
|
"spellchecker": "^3.7.1",
|
|
103
103
|
"through2": "^4.0.2",
|
|
104
|
-
"web-manager": "^4.1.
|
|
104
|
+
"web-manager": "^4.1.21",
|
|
105
105
|
"webpack": "^5.105.4",
|
|
106
106
|
"wonderful-fetch": "^1.3.4",
|
|
107
107
|
"wonderful-version": "^1.3.2",
|