|
2 yıl önce | |
---|---|---|
config | 2 yıl önce | |
mock | 2 yıl önce | |
public | 2 yıl önce | |
src | 2 yıl önce | |
tests | 2 yıl önce | |
.editorconfig | 2 yıl önce | |
.eslintignore | 2 yıl önce | |
.eslintrc | 2 yıl önce | |
.ga | 2 yıl önce | |
.gitignore | 2 yıl önce | |
.stylelintrc | 2 yıl önce | |
CODE_OF_CONDUCT.md | 2 yıl önce | |
LICENSE | 2 yıl önce | |
README.md | 2 yıl önce | |
README.us-EN.md | 2 yıl önce | |
package-lock.json | 2 yıl önce | |
package.json | 2 yıl önce | |
yarn.lock | 2 yıl önce |
@/
如:
js
import component from '@/components/**';
import utils from '@/utils/utils.js';
bash
yarn install 重新安装全部依赖
yarn add [-dev] 新增依赖[开发依赖]
yarn start 启动服务
yarn run build 构建打包
yarn run xxx 运行 package.json 中脚本 xxx
:white_check_mark: UI 测试:自动化测试保障前端产品质量
更快的二次编译速度
更兼容的开发环境
更简洁的依赖管理
生产环境更易调试的 sourcemap
├─ mock
├─ util.js 【获取 url 参数】
├─ public 【ico 等资源】
├─ src
├─ assets 【SVG资源】
├─ common 【通用功能】
├─ components 【通用组件】
├─ e2e 【端到端测试】
├─ layouts 【布局】
├─ models 【model 集合】
├─ ModuleName.js
├─ ModuleName.less
├─ pages 【模块单元】
├─ services 【fetch 请求统一配置】
├─ util 【工具方法】
├─ global.js 【入口】
├─ router.js 【路由根配置】
├─ tests 【测试】
工程初始化:
$ git clone git@git.yonyou.com:occ/occ.git
$ cd cc-portal-shop
$ yarn install
$ yarn start # 访问 http://localhost:8000
【非 npm 可忽略】为了 npm 安装速度更快,建议使用 cnpm 淘宝镜像:
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
工程打包:
$ npm run-script build
更多信息请参考 使用文档。
现代浏览器及 IE11。