Last active
August 29, 2015 14:07
-
-
Save shenduxian1/98c8206cb604e4cca0b6 to your computer and use it in GitHub Desktop.
前端基本开发流程
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
前端自动化开发流程 | |
本地开发环境初始化(webStrom编辑器) | |
1.安装编辑器(http://www.jetbrains.com/webstorm/) | |
2.安装Node.js(http://www.nodejs.org/) | |
3.添加Node到环境变量 | |
a)控制面板->用户账户->更改我的环境变量里编辑PATH并增加系统变量NODE_PATH | |
* 要注意的是NODE_PATH的目录要指定到npm\node_modules | |
4.安装ruby(http://rubyinstaller.org/downloads/)记得勾选自动添加环境变量,否则需要手动 | |
a)安装sass gem install sass | |
* 如果链接不到服务器,去gem官网搜索对应gem包下载后进入下载包所在文件路径后 输入 gem install –l filename.gem 进行安装 | |
或者切换到淘宝源进行安装,方式如下 | |
$ gem sources --remove http://rubygems.org/ | |
$ gem sources -a http://ruby.taobao.org/ | |
$ gem sources -l | |
*** CURRENT SOURCES *** | |
http://ruby.taobao.org | |
# 请确保只有 ruby.taobao.org | |
$ gem install foo | |
配置scss | |
1.在scss文件里会自动弹出add watcher 点击之后进去(settings里的fileWatcher) | |
2.默认应该系统识别出scss.bat位置,若没有,选择(例如:Ruby21-x64\bin\scss.bat) | |
3.在argumentt中增加--sourcemap=none | |
配置gulp | |
1.首先需要将gulp 部署到全局 在cmd里输入npm install gulp -g | |
2.在大项目根目录下(UedFe)拷贝package.json并执行npm install 进行所有package.json里devDependencies下的依赖文件安装 | |
2.每个项目的路径下拷贝gulpfile.js 后第一时间配置好项目的生成路径,之后再通过gulp task名进行任务执行即可 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment