mnfst-publish 0.1.1 → 0.1.2
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/manifest.publish.mjs +10 -8
- package/package.json +1 -1
package/manifest.publish.mjs
CHANGED
|
@@ -165,7 +165,6 @@ export function isExcludedPath(rel) {
|
|
|
165
165
|
const base = parts[parts.length - 1];
|
|
166
166
|
if (base === '.env' || base.startsWith('.env.')) return true; // .env, .env.local, .env.prod …
|
|
167
167
|
if (base === '.npmrc' || base === '.dev.vars' || base === 'id_rsa' || base === '.DS_Store') return true;
|
|
168
|
-
if (base === '.mnfst-render-complete') return true; // internal render sentinel — not part of the site
|
|
169
168
|
if (/\.(pem|key|p12|pfx)$/i.test(base)) return true;
|
|
170
169
|
return false;
|
|
171
170
|
}
|
|
@@ -298,16 +297,19 @@ export async function main() {
|
|
|
298
297
|
if (r.status !== 0) fail('render failed — fix the errors above and try again.');
|
|
299
298
|
}
|
|
300
299
|
|
|
301
|
-
// For a render project,
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
//
|
|
300
|
+
// For a render project, sanity-check there's actually a built site to ship —
|
|
301
|
+
// an output folder with an index.html. (When we just ran the render above, its
|
|
302
|
+
// exit code was already checked; this also covers --no-render and hand-built
|
|
303
|
+
// output.) Deliberately forgiving: no hard dependency on any marker file, so a
|
|
304
|
+
// good build always publishes regardless of which mnfst-render produced it.
|
|
305
305
|
if (source === 'render') {
|
|
306
306
|
const outDir = prerenderOutputDir(root);
|
|
307
|
-
if (!existsSync(join(root, outDir, '.
|
|
307
|
+
if (!existsSync(join(root, outDir, 'index.html'))) {
|
|
308
308
|
fail(
|
|
309
|
-
`the "${outDir}"
|
|
310
|
-
(opts.render === false
|
|
309
|
+
`the "${outDir}" folder doesn't have a built site yet (no index.html). ` +
|
|
310
|
+
(opts.render === false
|
|
311
|
+
? 'Remove --no-render so it builds first, or run `npx mnfst-render`, then publish again.'
|
|
312
|
+
: 'Run `npx mnfst-render` first, then publish again.'),
|
|
311
313
|
);
|
|
312
314
|
}
|
|
313
315
|
}
|