forked from sheetjs/docs.sheetjs.com
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
.PHONY: build
 | 
						|
build:
 | 
						|
	cp formats.png docz/static/formats.png
 | 
						|
	cd docz; npx -y pnpm build; cd ..
 | 
						|
	rm -rf docs
 | 
						|
	mv docz/build/ docs
 | 
						|
	cp _headers docs
 | 
						|
 | 
						|
.PHONY: init
 | 
						|
init:
 | 
						|
	cd docz; npm i || npm i --legacy-peer-deps; cd ..
 | 
						|
 | 
						|
.PHONY: dev
 | 
						|
dev:
 | 
						|
	cd docz; npm run start -- --host=0.0.0.0 --no-open; cd ..
 | 
						|
 | 
						|
.PHONY: serve
 | 
						|
serve:
 | 
						|
	npx -y http-server docs
 | 
						|
 | 
						|
.PHONY: spell
 | 
						|
spell:
 | 
						|
	npx spellchecker-cli -q -d .spelling -f 'docz/**/*.md*' --no-suggestions
 | 
						|
 | 
						|
.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
 | 
						|
 | 
						|
MDLINT=README.md $(wildcard docz/*.md*) $(wildcard docz/docs/*.md*) $(wildcard docz/docs/*/*.md*) $(wildcard docz/docs/*/*/*.md*)
 | 
						|
.PHONY: mdlint
 | 
						|
mdlint: $(MDLINT) ## Check markdown documents
 | 
						|
	npx alex $^
 | 
						|
	npx --package markdown-spellcheck -- mdspell -a -n -x -r --en-us $^
 |