From 8fc09e5593b9e9be07983aa98c9e4677bcae2431 Mon Sep 17 00:00:00 2001 From: Andrew Polk Date: Wed, 10 Jul 2024 09:57:49 -0700 Subject: [PATCH] Don't clear docs directory before a pull This lets us keep published pages published even when their status changes. It means that deletes will have to happen manually via git. --- package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 60138f1..7dac724 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "scripts": { - "simulate-locally": "yarn clear && yarn pull && yarn make-pdf && yarn crowdin:sync && yarn serve", + "simulate-locally": "yarn pull && yarn make-pdf && yarn crowdin:sync && yarn serve", "docusaurus": "docusaurus", "start": "yarn copy-static-docs && docusaurus start", "build": "yarn copy-static-docs && docusaurus build", @@ -13,12 +13,14 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "pull": "yarn clear && cross-var docu-notion -n $SIL_BLOOM_DOCS_NOTION_TOKEN -r $SIL_BLOOM_DOCS_NOTION_ROOT_PAGE --require-slugs --locales en,fr", + "pull": "cross-var docu-notion -n $SIL_BLOOM_DOCS_NOTION_TOKEN -r $SIL_BLOOM_DOCS_NOTION_ROOT_PAGE --require-slugs --locales en,fr", + "//clear-then-pull": "for a time, we were clearing by default but decided not to as a way to keep published pages published if their status changes (e.g. to ReadyForReview)", + "clear-then-pull": "yarn clear && cross-var docu-notion -n $SIL_BLOOM_DOCS_NOTION_TOKEN -r $SIL_BLOOM_DOCS_NOTION_ROOT_PAGE --require-slugs --locales en,fr", "pull-test-only": "yarn clear && cross-var docu-notion -n $SIL_BLOOM_DOCS_NOTION_TOKEN -r $SIL_BLOOM_DOCS_NOTION_ROOT_PAGE --status-tag test --log-level debug", "copy-static-docs": "cp ./static-docs/*.* ./docs", "docu-pdf": "docu-pdf", "make-pdf": "bash make-pdf.sh", - "pull-to-test-docs": "yarn clear && cross-var docu-notion -n $SIL_BLOOM_DOCS_NOTION_TOKEN -r $SIL_BLOOM_DOCS_NOTION_ROOT_PAGE -m \"./testdocs\" --status-tag test --log-level debug", + "pull-to-test-docs": "cross-var docu-notion -n $SIL_BLOOM_DOCS_NOTION_TOKEN -r $SIL_BLOOM_DOCS_NOTION_ROOT_PAGE -m \"./testdocs\" --status-tag test --log-level debug", "crowdin": "crowdin", "//pretranslate": " used to re-apply translations when files are renamed or reorganized", "crowdin:pretranslate": "crowdin pre-translate --method tm --translate-untranslated-only --translate-with-perfect-match-only --verbose",