best tutorial, step by step:
http://fairwaytech.com/2014/01/understanding-grunt-part-1-installation-linting-concatenation-and-minification/
linting
making sure that our code adheres to good JavaScript practices
concat
整合檔案的任務
uglify
是用來設定壓縮檔案並根據專案的 metadata 產生一些註解。
watch
This can be run on the command line with
grunt watch. When it detects any of the files specified have changed (here, I just use the same files I told JSHint to check), it will run the tasks you specify, in the order they appear.
● 外掛原則上可以分成兩類:開發過程的工具、發佈的工具
◎ 發佈的工具,以下將介紹:
grunt-contrib-concat
grunt-contrib-uglify
grunt-contrib-cssmin
grunt-contrib-copy
grunt-usemin
◎ 開發過程的工具,以下將介紹:
grunt-contrib-jshint
grunt-contrib-connect
grunt-contrib-watch
沒有留言:
張貼留言