官术网_书友最值得收藏!

Putting it all together

You've accomplished quite a bit, but there's one last thing we want to mention: the default task. If gulp is run with no parameters, it will look for a default task to perform. This can be anything you want.

To specify this, just add the following task at gulp/tasks/default.js:

module.exports = {
    deps: ["build"]
}

Now, if you execute gulp with no specific task, you'll actually start the build task instead. What you want to use for your default task is largely dependent upon your preferences.

Your Gulp configuration is now quite large and complex. We've added a few additional features to it in the code package, so it wouldn't be a bad idea to take a look at our final version in the code bundle of this book. We've also added several other features to the configuration, which you might want to investigate further. They are as follows:

  • BrowserSync for rapid iteration and testing
  • The ability to control whether or not any errors prevent further tasks from being executed
  • Help text
主站蜘蛛池模板: 凤阳县| 夏津县| 大同县| 垦利县| 临安市| 绥江县| 泉州市| 思茅市| 商南县| 涿鹿县| 喀喇沁旗| 绥阳县| 闻喜县| 安溪县| 滨海县| 大英县| 怀仁县| 万全县| 左云县| 乳源| 晋中市| 额济纳旗| 巴彦县| 锡林浩特市| 苏尼特左旗| 安泽县| 阿拉尔市| 东乌| 岑巩县| 巫山县| 双辽市| 正定县| 马关县| 三门县| 旬阳县| 玉环县| 开阳县| 农安县| 西和县| 白沙| 辰溪县|