tldr/Makefile

40 lines
981 B
Makefile
Raw Normal View History

2015-12-06 16:36:44 +00:00
default: lint
index:
@echo "WARNING!"
@echo "Index rebuilding is deprecated."
@echo "You should not do it, unless you understand why you doing this."
@echo
@TLDRHOME=`pwd` ./scripts/build_index.rb
@echo "Index rebuilt."
setup: prerequisites hooks deps
prerequisites:
@echo
@echo "IMPORTANT!"
@echo "Before setting up hooks, make sure you have read Contributing Guidelines"
@echo "https://github.com/tldr-pages/tldr/blob/master/CONTRIBUTING.md#submitting-a-pull-request"
@echo
@echo "TL;DR:"
@echo "1. Install Ruby suitable for your system"
@echo "2. Run 'gem install bundler'"
2016-01-13 13:10:26 +00:00
@echo "3. Install npm for your system"
@echo
hooks:
@cp ./scripts/pre-commit .git/hooks
@chmod +x .git/hooks/pre-commit
@echo "Git pre-commit hook installed."
deps:
@bundle
2016-01-13 13:10:26 +00:00
@npm install tldr-lint
@echo "OK"
lint:
2015-12-06 16:36:44 +00:00
@bundle exec mdl --style ./scripts/markdown-style.rb pages
2016-01-13 13:10:26 +00:00
@`pwd`/node_modules/.bin/tldr-lint ./pages
.PHONY: default index setup prerequisites hooks deps lint