随笔分类 -  自动化构建工具

摘要:使用bower init 可以快速创建bower.json文件bower init回答一系列问题后就可以了,其中大部分问题可以按enter跳过。 阅读全文
posted @ 2017-05-18 18:00 zc的救赎 阅读(188) 评论(0) 推荐(0)
摘要:使用grunt-init可以自动创建gruntfile.js和package.json文件。下面说一下过程:1、全局安装grunt-initnpm install -g grunt-init2、克隆grunt-init-gruntfile模板到本地git clone ... 阅读全文
posted @ 2017-05-18 17:42 zc的救赎 阅读(138) 评论(0) 推荐(0)
摘要:grunt-contrib-connect从0.11.x版本开始不支持connect.static和connect.directory你应该安装serve-static(加载静态文件)和serve-index(加载目录)npm install --save-dev g... 阅读全文
posted @ 2017-05-18 17:07 zc的救赎 阅读(296) 评论(0) 推荐(0)
摘要:grunt-contrib-connect可以在我们开发的时候自动刷新页面,省去了手动刷新的时间。下面说一下如何配置grunt-contrib-connect1、下载插件包npm install grunt-contrib-connect --save-dev2、在g... 阅读全文
posted @ 2017-05-18 16:33 zc的救赎 阅读(186) 评论(0) 推荐(0)
摘要:以安装jquery为例1、假设已经通过npm安装好了bower和grunt-wiredep,以及grunt-contrib-watch(用来观察文件变动)在gruntfile.js文件中增加任务wiredep: { target: { src:... 阅读全文
posted @ 2017-05-18 15:13 zc的救赎 阅读(223) 评论(0) 推荐(0)
摘要:在使用lodash的时候报_.contains is not a function,这是因为从lodash V3.10.1开始,将去掉contains函数,改用includes。可以换为:_.contains()->_.includes() 阅读全文
posted @ 2017-05-11 20:03 zc的救赎 阅读(3191) 评论(0) 推荐(0)
摘要:切换盘符,如切换到G盘:G:进入文件夹:cd 文件夹名回退:cd ..创建文件夹:mkdir 文件夹名删除文件夹:rmdir 文件夹名复制文件:copy hah.html .\hahaa\hah.html新建文件:copy nul jj.html 或者type nul... 阅读全文
posted @ 2017-05-11 15:38 zc的救赎 阅读(125) 评论(0) 推荐(0)
摘要:用grunt监视文件,当文件修改时,出现'Warning: Path must be a string . Received null Use --force to continuechuxian 。这个问题是因为没有设置reporterOutput,修改Gruntf... 阅读全文
posted @ 2017-05-11 14:40 zc的救赎 阅读(640) 评论(0) 推荐(0)
摘要:yeoman可以快速的搭建一个项目的手脚架,初次接触yeoman,在搭建的过程中遇到了很多的问题。yeoman需要node.js(http://nodejs.org)和git(http://git-scm.com/downloads)作为开发环境,所以需要先安装这两个... 阅读全文
posted @ 2017-05-09 23:51 zc的救赎 阅读(127) 评论(0) 推荐(0)