2015-12-06 16:36:44 +00:00
|
|
|
default: lint
|
2015-12-04 14:54:05 +00:00
|
|
|
|
2015-03-02 18:21:27 +00:00
|
|
|
index:
|
2015-12-25 10:11:51 +00:00
|
|
|
@echo "WARNING!"
|
|
|
|
@echo "Index rebuilding is deprecated."
|
|
|
|
@echo "You should not do it, unless you understand why you doing this."
|
|
|
|
@echo
|
2015-03-05 00:10:08 +00:00
|
|
|
@TLDRHOME=`pwd` ./scripts/build_index.rb
|
2015-03-02 18:21:27 +00:00
|
|
|
@echo "Index rebuilt."
|
2015-04-09 12:19:48 +01:00
|
|
|
|
2015-12-29 22:08:41 +00:00
|
|
|
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 14:27:29 +00:00
|
|
|
@echo "3. Install node 5.x"
|
|
|
|
@echo "4. Install npm"
|
2015-12-29 22:08:41 +00:00
|
|
|
@echo
|
2015-05-06 15:31:58 +01:00
|
|
|
|
|
|
|
hooks:
|
2015-04-09 12:19:48 +01:00
|
|
|
@cp ./scripts/pre-commit .git/hooks
|
|
|
|
@chmod +x .git/hooks/pre-commit
|
|
|
|
@echo "Git pre-commit hook installed."
|
2015-05-06 15:31:58 +01:00
|
|
|
|
|
|
|
deps:
|
|
|
|
@bundle
|
2016-01-14 13:22:20 +00:00
|
|
|
@npm install rubenvereecken/tldr-lint
|
2015-05-06 15:31:58 +01:00
|
|
|
@echo "OK"
|
2015-12-04 14:54:05 +00:00
|
|
|
|
2015-05-06 15:31:58 +01:00
|
|
|
lint:
|
2016-01-13 13:10:26 +00:00
|
|
|
@`pwd`/node_modules/.bin/tldr-lint ./pages
|
2016-01-13 22:07:00 +00:00
|
|
|
@bundle exec mdl --style ./scripts/markdown-style.rb pages
|
2015-12-04 14:54:05 +00:00
|
|
|
|
2015-12-29 22:08:41 +00:00
|
|
|
.PHONY: default index setup prerequisites hooks deps lint
|