add notes about skips (#1419)

* add notes about skips

* prettier

* re-add support for 'unpublished: true'

* prettier
This commit is contained in:
Konnor Rogers
2025-09-10 10:32:48 -04:00
committed by GitHub
parent b3b93091f7
commit 4993b1034f
2 changed files with 11 additions and 0 deletions

View File

@@ -160,6 +160,15 @@ export default async function (eleventyConfig) {
// Use our own markdown instance
eleventyConfig.setLibrary('md', markdown);
// for files with `unpublished: true`, it will make sure they do not make it into the final build at all, but will be usable in development.
eleventyConfig.addPreprocessor('unpublished', '*', (data, content) => {
if (data.unpublished && process.env.ELEVENTY_RUN_MODE === 'build') {
return false;
}
return content;
});
// Add anchors to headings
eleventyConfig.addTransform('doc-transforms', function (content) {
let doc = HTMLParse(content, { blockTextElements: { code: true } });

View File

@@ -123,6 +123,7 @@ export async function build(options = {}) {
function generateReactWrappers() {
// Used by webawesome-app to make re-rendering not miserable with extra React file generation.
if (process.env.SKIP_SLOW_STEPS === 'true') {
spinner.info('Skipping React Wrapper generation.');
return Promise.resolve();
}
@@ -162,6 +163,7 @@ export async function build(options = {}) {
async function generateTypes() {
// Used by webawesome-app to make re-rendering not miserable with extra TS compilations.
if (process.env.SKIP_SLOW_STEPS === 'true') {
spinner.info('Skipping TypeScript compiler.');
return Promise.resolve();
}