ultimate-jekyll-manager 1.3.11 → 1.3.12
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/CHANGELOG.md +7 -0
- package/dist/commands/setup.js +20 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
---
|
|
18
|
+
## [1.3.12] - 2026-05-25
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Fresh-consumer `npx mgr setup` now works on the first run.** Two ordering bugs prevented setup from succeeding on a brand-new consumer project: (1) `ensureBundle()` ran `bundle install` before `ensureCoreFiles()` scaffolded the `Gemfile`, failing with "Could not locate Gemfile" — reordered so core files are scaffolded first. (2) The gulpfile eagerly `require()`s every task module at load time, and `sass.js`/`distribute.js`/`imagemin.js` all call `Manager.getUJMConfig()` at module top-level, so a fresh consumer (with no `config/ultimate-jekyll-manager.json`) couldn't even invoke `gulp defaults` — extended `ensureCoreFiles()` to seed both `src/_config.yml` and `config/ultimate-jekyll-manager.json` from `dist/defaults/` before invoking gulp. Both steps remain idempotent (existing-file guard + `{ overwrite: false }` copy).
|
|
23
|
+
|
|
17
24
|
---
|
|
18
25
|
## [1.3.11] - 2026-05-24
|
|
19
26
|
|
package/dist/commands/setup.js
CHANGED
|
@@ -90,11 +90,6 @@ module.exports = async function (options) {
|
|
|
90
90
|
await ensureRubyVersion();
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
// Ensure proper bundler version + install/update gems
|
|
94
|
-
if (options.checkBundle) {
|
|
95
|
-
await ensureBundle();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
93
|
// Ensure peer dependencies are installed
|
|
99
94
|
if (options.checkPeerDependencies) {
|
|
100
95
|
await ensurePeerDependencies();
|
|
@@ -107,11 +102,17 @@ module.exports = async function (options) {
|
|
|
107
102
|
setupScripts();
|
|
108
103
|
}
|
|
109
104
|
|
|
110
|
-
// Ensure _config.yml
|
|
105
|
+
// Ensure _config.yml + scaffolded files (Gemfile, etc.) exist.
|
|
106
|
+
// Must run BEFORE ensureBundle so `bundle install` has a Gemfile to read on first setup.
|
|
111
107
|
if (options.ensureCoreFiles) {
|
|
112
108
|
await ensureCoreFiles();
|
|
113
109
|
}
|
|
114
110
|
|
|
111
|
+
// Ensure proper bundler version + install/update gems
|
|
112
|
+
if (options.checkBundle) {
|
|
113
|
+
await ensureBundle();
|
|
114
|
+
}
|
|
115
|
+
|
|
115
116
|
// Create CNAME file
|
|
116
117
|
if (options.createCname) {
|
|
117
118
|
createCname();
|
|
@@ -267,11 +268,20 @@ async function ensureCoreFiles() {
|
|
|
267
268
|
|
|
268
269
|
logger.log('No src/_config.yml found. Creating default config file...');
|
|
269
270
|
|
|
270
|
-
|
|
271
|
-
|
|
271
|
+
// Files that must exist BEFORE the gulpfile loads. Several task modules
|
|
272
|
+
// (sass/distribute/imagemin) read these at module top-level, so a fresh
|
|
273
|
+
// consumer can't even invoke `gulp defaults` without them.
|
|
274
|
+
const coreFiles = [
|
|
275
|
+
'src/_config.yml',
|
|
276
|
+
'config/ultimate-jekyll-manager.json',
|
|
277
|
+
];
|
|
272
278
|
|
|
273
|
-
|
|
274
|
-
|
|
279
|
+
coreFiles.forEach((relPath) => {
|
|
280
|
+
const sourcePath = path.join(rootPathPackage, 'dist/defaults', relPath);
|
|
281
|
+
const targetPath = path.join(rootPathProject, relPath);
|
|
282
|
+
jetpack.copy(sourcePath, targetPath, { overwrite: false });
|
|
283
|
+
logger.log(`Copied default ${relPath}`);
|
|
284
|
+
});
|
|
275
285
|
|
|
276
286
|
// Inject new config into config variable
|
|
277
287
|
config = Manager.getConfig('project');
|