Skip to content
Snippets Groups Projects
Commit 4b917466 authored by François Grand's avatar François Grand
Browse files

refactor(doc): output generated PDFs to dist rather than to src

refs #578
parent 959551a2
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!188Resolve "Ajouter le numéro de version de Cassiopée sur la documentation"
......@@ -5,9 +5,6 @@
/tmp
/out-tsc
/src/assets/docs
/compodoc-fr
/docs/fr/pdf
/docs/en/pdf
/release
/build
......
......@@ -23,7 +23,7 @@ import shutil
baseDir = os.getcwd();
latexSourceDir = os.path.join(baseDir, 'docs/latex')
buildDir = os.path.join(baseDir, 'build/pdf_build')
outputDir = os.path.join(baseDir, 'src/assets/docs/pdf')
outputDir = os.path.join(baseDir, 'dist/assets/docs/pdf')
latexModelDir = 'latex_models'
modelDir = os.path.join(buildDir, latexModelDir)
......
......@@ -15,12 +15,12 @@
"e2equick": "node scripts/check-translations.js && npm run ng -- e2e --dev-server-target= --suite=regular --webdriver-update=false",
"monkeytest": "npm run ng -- e2e --dev-server-target= --suite=monkeyTest --webdriver-update=false",
"mkdocs": "python3 -m mkdocs build -f mkdocs-fr.yml && python3 -m mkdocs build -f mkdocs-en.yml && node scripts/mkdocs-postprocess.js",
"mkdocs2pdf": "node scripts/extract-nghyd-version.js build/cassiopee_version.tex && python3 mkdocs2pdf.py",
"clean": "rm -rf build dist release src/date_revision.ts src/assets/docs compodoc-fr docs/fr/pdf docs/en/pdf docs/pdf_build docs/cassiopee_version.tex",
"mkdocs2pdf": "node scripts/extract-nghyd-version.js build/cassiopee_version.tex && python3 mkdocs2pdf.py && node scripts/mkdocs2pdf-postprocess.js",
"clean": "rm -rf build dist release src/date_revision.ts src/assets/docs",
"preprocess": "mkdir -p build; node scripts/preprocessors.js",
"start": "npm run preprocess && npm run mkdocs && npm run ng serve -- --host 0.0.0.0 --poll 5000",
"build-no-pdf": "npm run preprocess && npm run mkdocs && npm run ng build -- --configuration production",
"build": "npm run preprocess && npm run mkdocs && npm run mkdocs2pdf && npm run ng build -- --configuration production",
"build": "npm run preprocess && npm run mkdocs && npm run ng build -- --configuration production && npm run mkdocs2pdf",
"update-dist-index-mimetypes": "node scripts/update-dist-index-mimetypes.js",
"electron": "npm run update-dist-index-mimetypes && \"node_modules/.bin/electron\" .",
"release-linux-nocompile": "npm run update-dist-index-mimetypes && \"node_modules/.bin/electron-builder\"",
......
......@@ -52,6 +52,3 @@ fs.copySync("docs/matomo-tracking.js", destPath_EN_JS + "/matomo-tracking.js");
fs.copySync("node_modules/mermaid/dist/mermaid.min.js", destPath_JS + "/mermaid.min.js");
fs.copySync("node_modules/mermaid/dist/mermaid.min.js", destPath_FR_JS + "/mermaid.min.js");
fs.copySync("node_modules/mermaid/dist/mermaid.min.js", destPath_EN_JS + "/mermaid.min.js");
// copy illustrated guide (not related to MkDocs, but still a part of the doc)
fs.copySync("docs/cassiopee_notice_illustree_fr.pdf", "src/assets/docs/pdf/cassiopee_notice_illustree_fr.pdf");
'use strict';
/*
* mkdocs2pdf post processing.
* - copy illustrated guide (not related to MkDocs, but still a part of the doc) to dist/assets/docs/pdf
*/
const fs = require('fs-extra');
const destPath_PDF = "dist/assets/docs/pdf"; // pour la doc illustrée
fs.ensureDirSync(destPath_PDF);
fs.copySync("docs/cassiopee_notice_illustree_fr.pdf", destPath_PDF + "/cassiopee_notice_illustree_fr.pdf");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment