mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
build fixes
This commit is contained in:
@@ -197,7 +197,7 @@ export default async function (eleventyConfig) {
|
||||
// }
|
||||
|
||||
let assetsDir = path.join(process.env.BASE_DIR || 'docs', 'assets');
|
||||
const siteAssetsDir = path.join(eleventyConfig.directories.output, 'assets')
|
||||
const siteAssetsDir = path.join(eleventyConfig.directories.output, 'assets');
|
||||
fs.cpSync(assetsDir, siteAssetsDir, { recursive: true });
|
||||
|
||||
for (let glob of passThrough) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import ora from 'ora';
|
||||
import copy from 'recursive-copy';
|
||||
import { SimulateWebAwesomeApp } from '../docs/_utils/simulate-webawesome-app.js';
|
||||
import { generateDocs } from './docs.js'
|
||||
import { generateDocs } from './docs.js';
|
||||
import { getCdnDir, getDistDir, getDocsDir, getRootDir, getSiteDir } from './utils.js';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
@@ -4,14 +4,12 @@ import copy from 'recursive-copy';
|
||||
|
||||
import chalk from 'chalk';
|
||||
import { deleteAsync } from 'del';
|
||||
import { getCdnDir, getDocsDir, getEleventyConfigPath, getSiteDir } from './utils.js';
|
||||
import { join } from 'path';
|
||||
|
||||
|
||||
import { getCdnDir, getDocsDir, getEleventyConfigPath, getSiteDir } from './utils.js';
|
||||
|
||||
// 11ty
|
||||
export async function createEleventy(options = {}) {
|
||||
let { isIncremental, isDeveloping, rootDir } = options
|
||||
let { isIncremental, isDeveloping, rootDir } = options;
|
||||
|
||||
isDeveloping ??= process.argv.includes('--develop');
|
||||
isIncremental ??= process.argv.includes('--incremental');
|
||||
@@ -44,18 +42,18 @@ export async function createEleventy(options = {}) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the documentation site.
|
||||
*/
|
||||
* Generates the documentation site.
|
||||
*/
|
||||
export async function generateDocs(options = {}) {
|
||||
let { spinner, isIncremental, isDeveloping } = options
|
||||
let { spinner, isIncremental, isDeveloping } = options;
|
||||
|
||||
isDeveloping ??= process.argv.includes('--develop');
|
||||
isIncremental ??= process.argv.includes('--incremental');
|
||||
|
||||
let eleventy = globalThis.eleventy
|
||||
let eleventy = globalThis.eleventy;
|
||||
/**
|
||||
* Used by the webawesome-app to skip doc generation since it will do its own.
|
||||
*/
|
||||
* Used by the webawesome-app to skip doc generation since it will do its own.
|
||||
*/
|
||||
if (process.env.SKIP_ELEVENTY === 'true') {
|
||||
return;
|
||||
}
|
||||
@@ -66,8 +64,7 @@ export async function generateDocs(options = {}) {
|
||||
} else {
|
||||
}
|
||||
|
||||
|
||||
const output = []
|
||||
const output = [];
|
||||
|
||||
try {
|
||||
if (isIncremental) {
|
||||
@@ -78,7 +75,7 @@ export async function generateDocs(options = {}) {
|
||||
await deleteAsync(getSiteDir());
|
||||
|
||||
globalThis.eleventy = await createEleventy(options);
|
||||
const eleventy = globalThis.eleventy
|
||||
const eleventy = globalThis.eleventy;
|
||||
|
||||
// Write it
|
||||
await eleventy.write();
|
||||
@@ -99,4 +96,3 @@ export async function generateDocs(options = {}) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user