From d05bee39497decb50cd4fcd3f30433b80081d698 Mon Sep 17 00:00:00 2001 From: Pomax Date: Sun, 27 Sep 2020 10:30:22 -0700 Subject: [PATCH] don't deploy .md files --- docs/index.html | 2 +- docs/ja-JP/index.html | 2 +- docs/news/2020-09-18.html | 2 +- docs/news/index.html | 2 +- docs/news/rss.xml | 2 +- docs/zh-CN/index.html | 2 +- package.json | 20 ++++++++++++++------ src/build.js | 4 ++++ 8 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/index.html b/docs/index.html index 4607edee..502c19ac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ - + diff --git a/docs/ja-JP/index.html b/docs/ja-JP/index.html index 90a31609..09c3db2b 100644 --- a/docs/ja-JP/index.html +++ b/docs/ja-JP/index.html @@ -33,7 +33,7 @@ - + diff --git a/docs/news/2020-09-18.html b/docs/news/2020-09-18.html index b48667f9..b2e41349 100644 --- a/docs/news/2020-09-18.html +++ b/docs/news/2020-09-18.html @@ -27,7 +27,7 @@ - + diff --git a/docs/news/index.html b/docs/news/index.html index 0fad8638..99884b91 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -26,7 +26,7 @@ - + diff --git a/docs/news/rss.xml b/docs/news/rss.xml index 6e0534cc..69378a28 100644 --- a/docs/news/rss.xml +++ b/docs/news/rss.xml @@ -6,7 +6,7 @@ News updates for the primer on Bézier Curves by Pomax en-GB - Sun Sep 27 2020 10:04:48 +00:00 + Sun Sep 27 2020 10:29:42 +00:00 https://pomax.github.io/bezierinfo/images/og-image.png A Primer on Bézier Curves diff --git a/docs/zh-CN/index.html b/docs/zh-CN/index.html index 91dcf633..ee48169c 100644 --- a/docs/zh-CN/index.html +++ b/docs/zh-CN/index.html @@ -33,7 +33,7 @@ - + diff --git a/package.json b/package.json index 2da6255c..d34ccbb3 100644 --- a/package.json +++ b/package.json @@ -14,31 +14,39 @@ "url": "https://github.com/Pomax/BezierInfo-2/issues" }, "scripts": { + "---": "--- These are the only three scripts you should care about ---", "start": "run-s clean:* time lint:* build time clean:temp", "test": "run-s start && run-p watch server browser", - "deploy": "run-s regenerate copy", - "------": "--- note that due to github's naming policy, the public dir is called 'docs' rather than 'public' ---", + "deploy": "run-s start polish copy", + "-------": "--- Note that due to github's naming policy, the public dir is called `docs` rather than `public` ---", "browser": "open-cli http://localhost:8000", "build": "node ./src/build.js", + "time": "node ./src/mark.js", "clean:temp": "rm -f .timing && rm -rf ./temp", "clean:news": "rm -f ./docs/news/*.html", "polish": "run-s pretty link-checker", - "regenerate": "run-s start polish", - "copy": "mkdir _ && mv ../bezierinfo/.git _ && rm -rf ../bezierinfo && cp -r ./docs/. ../bezierinfo && mv _/.git ../bezierinfo && rm -rf _", + "----": "--- The copy commands rely on a parallel `bezierinfo` git repo existing ---", + "copy": "run-s copy:*", + "copy:prepare": "mkdir _ && mv ../bezierinfo/.git _ && rm -rf ../bezierinfo ", + "copy:files": "cp -r ./docs/. ../bezierinfo", + "copy:remove-md": "rm ../bezierinfo/chapters/**/*.md && rm ../bezierinfo/news/*.md", + "copy:cleanup": "mv _/.git ../bezierinfo && rm -rf _", + "----------": "--- Prettier is your friend. ---", "lint:tools": "prettier \"./src/**/*.js\" --print-width 150 --write", "lint:lib": "prettier \"./docs/js/**/*.js\" --print-width 150 --write", "lint:css": "prettier \"./docs/**/*.css\" --print-width 150 --write", "link-checker": "link-checker \"docs/index.html\" --allow-hash-href --url-ignore \"(ja-JP|zh-CN|legendre).*\" --ignore-error-exit", "pretty": "prettier \"./docs/{!(legendre-gauss),**/*}.html\" --use-tabs --print-width 150 --write", + "------": "--- Server and watch tasks ---", "server": "cd docs && http-server -e -p 8000 --cors", "watch": "run-p watch:*", "watch:chapters": "chokidar \"./docs/chapters/**/*.(md|js)\" -c \"npm run build\"", "watch:news": "chokidar \"./docs/news/**/*.md\" -c \"npm run build\"", "watch:customelement": "chokidar \"./docs/js/custom-element/**/*.js\" -c \"npm run build\"", "watch:src": "chokidar \"./src/**/*.*\" -c \"npm run build\"", + "-----": "--- Used as part of LaTeX generation: ---", "svgo": "svgo", - "svgo:pretty": "node ./src/svgo-pretty.js", - "time": "node ./src/mark.js" + "svgo:pretty": "node ./src/svgo-pretty.js" }, "keywords": [ "Bezier", diff --git a/src/build.js b/src/build.js index 5ddd804c..c57ae5d5 100644 --- a/src/build.js +++ b/src/build.js @@ -4,6 +4,10 @@ import { processLocale } from "./build/process-locale.js"; import { createIndexPages } from "./build/create-index-pages.js"; import { createNewsPages } from "./build/create-news-pages.js"; +// TODO: figure out a way to cleanly indicate which dir is "the main content", needing +// to be compiled into the index.html file, and which dirs are "satellite content" +// that should get compiled into its own dir. + /** * main entry point: */