kopia lustrzana https://github.com/shoelace-style/shoelace
smarter exit
rodzic
620b86cddb
commit
0de54b163a
|
@ -35,7 +35,6 @@
|
|||
"cem-plugin-vs-code-custom-data-generator": "^1.4.1",
|
||||
"chalk": "^5.2.0",
|
||||
"change-case": "^4.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"command-line-args": "^5.2.1",
|
||||
"comment-parser": "^1.3.1",
|
||||
"cspell": "^6.18.1",
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
"cem-plugin-vs-code-custom-data-generator": "^1.4.1",
|
||||
"chalk": "^5.2.0",
|
||||
"change-case": "^4.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"command-line-args": "^5.2.1",
|
||||
"comment-parser": "^1.3.1",
|
||||
"cspell": "^6.18.1",
|
||||
|
|
|
@ -3,7 +3,6 @@ import { exec, spawn } from 'child_process';
|
|||
import { globby } from 'globby';
|
||||
import browserSync from 'browser-sync';
|
||||
import chalk from 'chalk';
|
||||
import chokidar from 'chokidar';
|
||||
import commandLineArgs from 'command-line-args';
|
||||
import copy from 'recursive-copy';
|
||||
import esbuild from 'esbuild';
|
||||
|
@ -32,7 +31,6 @@ let buildResult;
|
|||
async function buildTheDocs(watch = false) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const args = ['@11ty/eleventy', '--quiet'];
|
||||
const watcher = chokidar.watch(sitedir, { persistent: true });
|
||||
const output = [];
|
||||
|
||||
if (watch) {
|
||||
|
@ -50,15 +48,8 @@ async function buildTheDocs(watch = false) {
|
|||
output.push(data.toString());
|
||||
});
|
||||
|
||||
// Spin up Eleventy and wait for the search index to appear before proceeding. The search index is generated during
|
||||
// eleventy.after, so it appears only after the docs are fully published. This is a hacky way to detect when the
|
||||
// initial publish is complete, but here we are.
|
||||
watcher.on('add', async filename => {
|
||||
if (filename.endsWith('search.json')) {
|
||||
await watcher.close();
|
||||
|
||||
resolve({ child, output });
|
||||
}
|
||||
child.on('close', () => {
|
||||
resolve({ child, output });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -273,8 +264,6 @@ if (!serve) {
|
|||
if (result.output.length > 0) {
|
||||
console.log('\n' + result.output.join('\n'));
|
||||
}
|
||||
|
||||
process.exit();
|
||||
}
|
||||
|
||||
// Cleanup on exit
|
||||
|
|
Ładowanie…
Reference in New Issue