Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .PHONY: dist test
  2. default: help
  3. # build all theme
  4. build-theme:
  5. npm run build:theme
  6. install:
  7. npm install
  8. install-cn:
  9. npm install --registry=http://registry.npm.taobao.org
  10. dev:
  11. npm run dev
  12. new:
  13. node build/bin/new.js $(filter-out $@,$(MAKECMDGOALS))
  14. dist: install
  15. npm run dist
  16. dist-all:
  17. npm run dist:all
  18. deploy:
  19. @npm run deploy
  20. pub:
  21. ./node_modules/.bin/kp $(filter-out $@,$(MAKECMDGOALS))
  22. pub-all:
  23. npm run pub:all
  24. test:
  25. npm run test:watch
  26. help:
  27. @echo " \033[35mmake\033[0m \033[1m命令使用说明\033[0m"
  28. @echo " \033[35mmake install\033[0m\t\033[0m\t\033[0m\t\033[0m\t--- 安装依赖"
  29. @echo " \033[35mmake new <component-name> [中文名]\033[0m\t--- 创建新组件 package. 例如 'make new button 按钮'"
  30. @echo " \033[35mmake dev\033[0m\t\033[0m\t\033[0m\t\033[0m\t--- 开发模式"
  31. @echo " \033[35mmake dist\033[0m\t\033[0m\t\033[0m\t\033[0m\t--- 编译项目,生成目标文件"
  32. @echo " \033[35mmake dist-all\033[0m\t\033[0m\t\033[0m\t--- 分别编译每个组件项目"
  33. @echo " \033[35mmake deploy\033[0m\t\033[0m\t\033[0m\t\033[0m\t--- 部署 demo"
  34. @echo " \033[35mmake pub\033[0m\t\033[0m\t\033[0m\t\033[0m\t--- 发布到 npm 上"
  35. @echo " \033[35mmake pub-all\033[0m\t\033[0m\t\033[0m\t\033[0m\t--- 发布各组件到 npm 上"