docs.sheetjs.com/Makefile

49 lines
1.3 KiB
Makefile
Raw Normal View History

2022-05-16 03:26:04 +00:00
.PHONY: build
build:
2022-07-07 04:05:14 +00:00
cp formats.png docz/docs/img/formats.png
2022-05-17 03:19:39 +00:00
cd docz; npx -y pnpm build; cd ..
2022-05-16 03:26:04 +00:00
rm -rf docs
mv docz/build/ docs
2022-05-16 03:30:34 +00:00
cp CNAME docs
2022-05-16 03:26:04 +00:00
2022-05-31 02:53:56 +00:00
.PHONY: serve
2022-05-23 03:37:51 +00:00
serve:
2022-07-07 04:05:14 +00:00
cd docs; python -mSimpleHTTPServer || python3 -mhttp.server; cd -
2022-05-23 03:37:51 +00:00
2022-08-21 19:43:30 +00:00
.PHONY: spell
spell:
npx spellchecker-cli -d .spelling -f 'docz/**/*.md*'
2020-01-28 05:02:07 +00:00
.PHONY: index
2022-05-11 21:03:03 +00:00
index: readme ## Rebuild site
sed -i .bak 's/](d/](https:\/\/github.com\/SheetJS\/SheetJS\/tree\/master\/d/g' README.md
grip --title "SheetJS Community Edition" --export README.md
mv README.html index.html
git add README.md index.html *.png
2020-01-28 05:02:07 +00:00
#mv js-xlsx/README.md .
#git add README.md
2022-05-11 21:03:03 +00:00
.PHONY: readme
readme: README.md
markdown-toc -i README.md
.PHONY: graph
graph: formats.png legend.png ## Rebuild format conversion graph
misc/formats.svg: misc/formats.dot
circo -Tsvg -o$@ $<
misc/legend.svg: misc/legend.dot
dot -Tsvg -o$@ $<
formats.png legend.png: %.png: misc/%.svg
node misc/coarsify.js misc/$*.svg misc/$*.svg.svg
npx svgexport misc/$*.svg.svg $@ 0.5x
2022-05-16 03:26:04 +00:00
MDLINT=README.md $(wildcard docz/*.md*) $(wildcard docz/docs/*.md*) $(wildcard docz/docs/*/*.md*)
2022-05-11 21:03:03 +00:00
.PHONY: mdlint
mdlint: $(MDLINT) ## Check markdown documents
npx alex $^
npx --package markdown-spellcheck -- mdspell -a -n -x -r --en-us $^
READEPS=$(sort $(wildcard docbits/*.md))
README.md: $(READEPS)
awk 'FNR==1{p=0}/#/{p=1}p' $^ | tr -d '\15\32' > $@