You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.6 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. .PHONY: start install serve build i18n-upload i18n-download
  2. .DEFAULT_GOAL := start
  3. start:
  4. @make install
  5. @make serve
  6. install: test-builddeps
  7. @git submodule update --init --recursive
  8. @bundle install
  9. @yarn install
  10. serve: test-builddeps
  11. @yarn start& bundle exec jekyll serve --incremental& wait
  12. build: test-builddeps
  13. @yarn build
  14. @bundle exec jekyll build
  15. serve-production: test-builddeps
  16. @make crowdin-download
  17. @NODE_ENV=production yarn build:production
  18. @JEKYLL_ENV=production bundle exec jekyll serve
  19. build-production: test-builddeps
  20. ifeq ($(CONTEXT), "production")
  21. @make crowdin-download
  22. @ruby ./scripts/validate-translations.rb
  23. endif
  24. @NODE_ENV=production yarn build:production
  25. @JEKYLL_ENV=production bundle exec jekyll build
  26. crowdin-upload: test-crowdin
  27. @crowdin-cli upload sources --auto-update -b master
  28. crowdin-download: test-crowdin
  29. @crowdin-cli download -b master | grep -v '^Extracting: ' | grep -v '^ - '
  30. @ruby ./scripts/remove-unused-languages.rb
  31. @ruby ./scripts/normalize-translations.rb
  32. ###
  33. # Misc stuff:
  34. ###
  35. BUNDLE_EXISTS := $(shell command -v bundle 2> /dev/null)
  36. CROWDIN_EXISTS := $(shell command -v crowdin-cli 2> /dev/null)
  37. YARN_EXISTS := $(shell command -v yarn 2> /dev/null)
  38. test-builddeps:
  39. ifndef BUNDLE_EXISTS
  40. $(error bundler is not installed. Run `gem install bundler`)
  41. endif
  42. ifndef YARN_EXISTS
  43. $(error yarn is not installed. Follow the instructions on https://yarnpkg.com/docs/install)
  44. endif
  45. test-crowdin:
  46. ifndef CROWDIN_EXISTS
  47. $(error Crowdin is not installed. Run `make install`)
  48. endif
  49. ifndef CROWDIN_API_KEY
  50. $(error CROWDIN_API_KEY is undefined)
  51. endif

js yarn包管理组件依赖分析

Contributors (1)