fix(app):docs building script

This commit is contained in:
Alex 2020-04-22 08:58:57 +03:00
parent a769ca67f5
commit d6e92b4139
3 changed files with 15 additions and 1 deletions

View file

@ -1,6 +1,7 @@
[
{
"checkoutTarget": "gh-pages-deploy-fix",
"name": "demo",
"path": "/ngx-admin/",
"isCurrent": true
}

View file

@ -12,6 +12,7 @@
"scripts": {
"ng": "ng",
"ngh": "ngh",
"gulp": "gulp",
"conventional-changelog": "conventional-changelog",
"start": "ng serve",
"build": "ng build",
@ -27,6 +28,8 @@
"e2e": "ng e2e",
"docs": "compodoc -p src/tsconfig.app.json -d docs",
"docs:build": "npm run build -- docs --prod --aot --base-href /ngx-admin/",
"docs:parse": "gulp docs",
"docs:prepare": "npm-run-all docs:parse",
"docs:serve": "npm start -- docs --port 4100",
"docs:gh-pages": "ts-node -P ./scripts/docs/tsconfig.json ./scripts/docs/build-docs.ts",
"prepush": "npm run lint:ci",
@ -61,6 +64,7 @@
"core-js": "2.5.1",
"echarts": "^4.0.2",
"eva-icons": "^1.1.3",
"gulp-bump": "2.7.0",
"highlight.js": "^9.18.1",
"intl": "1.2.5",
"ionicons": "2.0.1",
@ -98,9 +102,17 @@
"@types/jasminewd2": "2.0.3",
"@types/leaflet": "1.2.3",
"@types/node": "^12.11.1",
"@types/gulp": "4.0.6",
"angular-cli-ghpages": "^0.6.2",
"codelyzer": "^5.1.2",
"conventional-changelog-cli": "1.3.4",
"gulp": "4.0.2",
"gulp-rename": "1.4.0",
"gulp-replace": "1.0.0",
"gulp-rollup": "2.13.0",
"gulp-sass": "4.0.2",
"gulp-sourcemaps": "2.6.5",
"gulp-typedoc": "2.2.3",
"husky": "0.13.3",
"jasmine-core": "2.6.4",
"jasmine-spec-reporter": "4.1.1",

View file

@ -27,7 +27,7 @@ export interface Version {
await mkdirp(WORK_DIR);
log(`Cloning ${REPO_URL} into ${MASTER_BRANCH_DIR}`);
await runCommand(`git clone ${REPO_URL} ${MASTER_BRANCH_DIR}`, { cwd: WORK_DIR });
await runCommand(`git clone -b gh-pages-deploy-fix ${REPO_URL} ${MASTER_BRANCH_DIR}`, { cwd: WORK_DIR });
log('Reading versions configuration');
const config: Version[] = await import(DOCS_VERSIONS_PATH);
@ -70,6 +70,7 @@ 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);