fix(app):add gulpfile for docs

This commit is contained in:
Alex 2020-04-22 13:53:07 +03:00
parent d6e92b4139
commit 8e66b07eb9
8 changed files with 3146 additions and 17 deletions

View file

@ -70,7 +70,6 @@ async function buildDocs(versions: Version[]) {
}
async function prepareVersion(version: Version, distDir: string, ghspaScript: string) {
console.log(version);
const projectDir = join(WORK_DIR, `${version.name}`);
await copyToBuildDir(MASTER_BRANCH_DIR, projectDir);
@ -111,10 +110,10 @@ async function buildDocsApp(projectDir: string, baseHref: string) {
if (!baseHref.endsWith('/')) {
baseHref = baseHref + '/';
}
await runCommand('npm run docs:prepare', { cwd: projectDir });
await runCommand(`npm run build -- docs --prod --base-href '${baseHref}'`, { cwd: projectDir });
await runCommand('npm run docs:dirs', { cwd: projectDir });
}
await runCommand('npm run build -- docs --prod --aot --base-href /ngx-admin/', { cwd: projectDir });
// await runCommand(`npm run build -- docs --prod --base-href '${baseHref}'`, { cwd: projectDir });
// await runCommand('npm run docs:dirs', { cwd: projectDir });
}
async function deploy(distDir: string) {
await runCommand(
@ -122,3 +121,4 @@ async function deploy(distDir: string) {
{ cwd: distDir, showLog: true },
);
}