Showing
3 changed files
with
68 additions
and
29 deletions
docs/build.md
0 → 100644
1 | +# 开发环境配置说明文档 | ||
2 | + | ||
3 | +## 需要的东西 | ||
4 | + | ||
5 | +* node/npm | ||
6 | +* compass(compass依赖ruby,需使用gem install compass进行安装) | ||
7 | +* git | ||
8 | +* PHP5.3 | ||
9 | +* Nginx | ||
10 | + | ||
11 | +## 步骤 | ||
12 | + | ||
13 | +### NODE安装 | ||
14 | + | ||
15 | +[node官方](https://nodejs.org/en/)下载后安装即可 | ||
16 | + | ||
17 | +### SPM安装 | ||
18 | + | ||
19 | +项目使用spm作为前端资源调试、打包的工具,通过npm安装。注意:spm版本统一使用**3.4.1** | ||
20 | + | ||
21 | +`npm install -g spm@3.4.1` | ||
22 | + | ||
23 | +### ruby->compass安装 | ||
24 | + | ||
25 | +[ruby官方Downloads](https://www.ruby-lang.org/en/downloads/)下载安装 | ||
26 | + | ||
27 | +任务栏打开 `Start Command Prompt With Ruby`,运行 `gem install compass`安装 | ||
28 | + | ||
29 | +PS:此步可能由于国外源的问题下载比较慢,可以更换源或者直接copy他人目录 | ||
30 | + | ||
31 | +### 安装GIT | ||
32 | + | ||
33 | +[GIT官方](http://git-scm.com/download/) | ||
34 | + | ||
35 | +### GIT账号 | ||
36 | +* [git.dev.yoho.cn](git.dev.yoho.cn)注册git账号 | ||
37 | +* 将注册的账号告知组长,开放权限 | ||
38 | +* 配置git账号给`git config --global user.name "your name"` / `git config --global user.email "your email"` | ||
39 | +* 在GIT BASH中运行`ssh-keygen -t rsa -C "your email"`,将~/.ssh目录下的pubkey的内容copy到git.dev.yoho.cn中的SSH Keys中 | ||
40 | + | ||
41 | +### 拉取代码 | ||
42 | +* git clone git@git.dev.yoho.cn:web/yohobuy.git | ||
43 | +* git checkout develop | ||
44 | +* git submodule init | ||
45 | +* git submodule update | ||
46 | + | ||
47 | +### PHP和Nginx | ||
48 | + | ||
49 | +如果不想自己搭建和配置,直接copy同桌的目录来就可以了,nginx和php5.3.29。copy后修改nginx配置中的路径就可以了: | ||
50 | +conf/vhosts,nginx注册表文件,restart-nginx.bat, start-nginx.bat, start-php5.3.29.bat | ||
51 | + | ||
52 | +修改完成后可以直接点击start-php5.3.29.bat 和 start-nginx.bat启动PHP和NGINX的服务 | ||
53 | + | ||
54 | +### 配置HOSTS | ||
55 | +127.0.0.1 m.dev.yohobuy.com | ||
56 | +127.0.0.1 static.m.dev.yohobuy.com | ||
57 | + | ||
58 | +### 最后一步 | ||
59 | +进入yohobuy/static目录,运行npm install 和 spm install安装下依赖, 成功后在当前目录运行`gulp`启动开发环境服务...看看[m.dev.yohobuy.com](m.dev.yohobuy.com)有没有反应? | ||
60 | + | ||
61 | +Done ? 'congratulations' : '看看是不是缺了什么,不能解决的时候再问问其他人看看' | ||
62 | + | ||
63 | +## 其他你需要做的事情 | ||
64 | +* js代码风格严格控制,所以请按照[代码规范](http://git.dev.yoho.cn/web/learning-documentation/tree/master/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E7%9B%B8%E5%85%B3/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83)编码,JS代码采用了pre-commit的hook进行控制,之前需要你安装下[代码检查](http://git.dev.yoho.cn/ued/yoho-fe/tree/master/code-checker)所需要的东西,请了解并执行。 | ||
65 | +* GIT使用规范你需要熟读,可以看[git flow](http://git.dev.yoho.cn/web/learning-documentation/wikis/home)、[pro git](http://git-scm.com/book/en/v2) | ||
66 | +* 其他开发中使用到的东西(handlebars,sass,seajs,spm等)请参考git库web/learing documentation或者自行google |
npm-debug.log
deleted
100644 → 0
1 | -0 info it worked if it ends with ok | ||
2 | -1 verbose cli [ 'node', | ||
3 | -1 verbose cli 'c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js', | ||
4 | -1 verbose cli '--userconfig=C:\\Users\\Administrator\\.cnpmrc', | ||
5 | -1 verbose cli '--disturl=https://npm.taobao.org/mirrors/node', | ||
6 | -1 verbose cli '--cache=C:\\Users\\Administrator\\.cnpm', | ||
7 | -1 verbose cli '--registry=https://registry.npm.taobao.org', | ||
8 | -1 verbose cli '--node-gyp=c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js', | ||
9 | -1 verbose cli 'install', | ||
10 | -1 verbose cli '-d' ] | ||
11 | -2 info using npm@2.13.5 | ||
12 | -3 info using node@v0.12.0 | ||
13 | -4 verbose readDependencies loading dependencies from d:\YOHO\yohobuy\package.json | ||
14 | -5 error install Couldn't read dependencies | ||
15 | -6 verbose stack Error: ENOENT, open 'd:\YOHO\yohobuy\package.json' | ||
16 | -6 verbose stack at Error (native) | ||
17 | -7 verbose cwd d:\YOHO\yohobuy | ||
18 | -8 error Windows_NT 6.1.7601 | ||
19 | -9 error argv "node" "c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig=C:\\Users\\Administrator\\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=C:\\Users\\Administrator\\.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=c:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\pangyp\\bin\\node-gyp.js" "install" "-d" | ||
20 | -10 error node v0.12.0 | ||
21 | -11 error npm v2.13.5 | ||
22 | -12 error path d:\YOHO\yohobuy\package.json | ||
23 | -13 error code ENOPACKAGEJSON | ||
24 | -14 error errno -4058 | ||
25 | -15 error package.json ENOENT, open 'd:\YOHO\yohobuy\package.json' | ||
26 | -15 error package.json This is most likely not a problem with npm itself. | ||
27 | -15 error package.json npm can't find a package.json file in your current directory. | ||
28 | -16 verbose exit [ -4058, true ] |
-
Please register or login to post a comment