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 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
 
@@ -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 exists
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
- const sourcePath = path.join(rootPathPackage, 'dist/defaults/src/_config.yml');
271
- const targetPath = path.join(rootPathProject, 'src/_config.yml');
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
- jetpack.copy(sourcePath, targetPath);
274
- logger.log(`Copied default _config.yml to src/_config.yml`);
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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {