forked from zhaohuijian/fez
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhaohuijian
committed
Mar 20, 2017
1 parent
b39a5b4
commit 011958b
Showing
49 changed files
with
4,664 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
{ | ||
/* ================================== | ||
* @ 2017 FEZ 前端模块工程自动化构建工具 | ||
* https://github.com/furic-zhao/fez | ||
* ================================== */ | ||
|
||
/** | ||
* 研发环境 browsersync配置信息 | ||
*/ | ||
"browsersync": { | ||
"available": true, //开启浏览器自动化刷新 | ||
"port": 8080, //本地服务器的默认端口 | ||
"startPath": "zindex.html" //打开浏览器默认访问的页面 | ||
}, | ||
|
||
/** | ||
* bowserify配置 | ||
*/ | ||
"browserify": { | ||
"options": { | ||
"extensions": [], // import require 引入文件时可以省略的扩展名 | ||
"paths": ["./src/views"] // import require 引入文件的根路径 | ||
}, | ||
/** | ||
* 抽取来通过 import $ from 'jquery';或let $ = require('jquery'); | ||
* 引入的公共文件不和业务逻辑文件打包到一起 | ||
* 此处配置后需要通过script标签形式在页面引入 | ||
* 具体信息请参考:https://github.com/thlorenz/browserify-shim | ||
*/ | ||
"shim": [{ | ||
"import": "$", | ||
"from": "jquery" | ||
}, { | ||
"import": "Q", | ||
"from": "q" | ||
}, { | ||
"import": "Vue", | ||
"from": "vue" | ||
}, { | ||
"import": "PNotify", | ||
"from": "pnotify" | ||
}, { | ||
"import": "echarts", | ||
"from": "echarts" | ||
}, { | ||
"import": "Vuex", | ||
"from": "vuex" | ||
}, { | ||
"import": "store", | ||
"from": "store" | ||
}] | ||
}, | ||
|
||
/** | ||
* 研发环境 Javascript 语法自动化测试 | ||
* .jshintrc可做详细配置 | ||
*/ | ||
"useJsHint": { | ||
"available": false, //启用 jshint 自动化测试 | ||
"files": "./src/views/**/*.js" //检测文件 | ||
}, | ||
|
||
/** | ||
* 选择css编译器【取值:less/sass/css】 | ||
*/ | ||
"cssCompiler": "less", | ||
|
||
/** | ||
* 启用 PX => REM 自动化转换 | ||
* 如果启用 REM 转换需要在公共样式中对<html>设置基准值 | ||
* 通过 media媒体查询 为 <html> 设置不同值 以实现在不同的屏幕中等比缩放 | ||
*/ | ||
"useREM": { | ||
"css": { | ||
"available": false, //启用 css 中的 px => rem 转换 【包含less,sass】 | ||
/** | ||
* 配置参考:https://github.com/cuth/postcss-pxtorem | ||
*/ | ||
"options": { | ||
"rootValue": 16, //相对于html根字体大小 | ||
"unitPrecision": 5, //允许REM单位增长到的十进制数 | ||
"propList": ["*"], //可以从px更改为rem的属性 | ||
"selectorBlackList": [], //要忽略的选择器 | ||
"replace": true, //替换包含rems的规则,而不是添加fallback | ||
"mediaQuery": false, //允许在媒体查询中转换px | ||
"minPixelValue": 0 //设置要替换的最小像素值 | ||
} | ||
} | ||
}, | ||
|
||
/** | ||
* 生产环境 启用 图片 => webp 自动化转换 | ||
*/ | ||
"useWebp": false, | ||
|
||
/** | ||
* 生产环境 上传sftp服务器配置信息 | ||
*/ | ||
"sftp": { | ||
"host": "xxx.xxx.xxx.xxx", | ||
"port": "22", | ||
"user": "root", | ||
"password": "", | ||
"remotePath": "/var/www/html/fez-demo", | ||
"includeHtml": true //是否包含 html 文件 | ||
}, | ||
|
||
/** | ||
* 生产环境 启用CDN静态资源url替换 | ||
*/ | ||
"useCdn": { | ||
"available": false, | ||
"base": "http://fezcdn.com/", //默认CDN地址 | ||
"js": "http://js.fezcdn.com/", //脚本CDN地址 | ||
"css": "http://css.fezcdn.com/", //样式CDN地址 | ||
"images": "http://img.fezcdn.com/", //图片CDN地址 | ||
"fonts": "http://fonts.fezcdn.com/" //字体CDN地址 | ||
}, | ||
|
||
/**html自动化注入文件* | ||
* 【支持自定义打包多个文件到一个文件】 | ||
* 【支持自定义打包单个文件】 | ||
* 【未配置的文件自动打包成一个文件】 | ||
* 【插入页面顺序以字母或数字降序排列-解决插入页面的脚本文件依赖关系】 | ||
* 【打包顺序以文件配置先后降序排列-解决打包文件间的依赖关系】 | ||
*/ | ||
"useInject": { | ||
/** | ||
* ---------- bower打包格式 仅对 生产环境------------ | ||
* 打包文件支持 gulp格式的正则文件名 | ||
* { | ||
* "target": "{排序序号}-vendor-{打包名称}.js", | ||
* "contain": ["{文件1}", "{文件2}", "{文件3}"] | ||
* } | ||
*/ | ||
"bower": { | ||
"available": true, //启用 bower 文件自动化注入 | ||
"js": [{ | ||
"target": "a-vendor-jquery.js", | ||
"contain": ["**/jquery.js"] | ||
}, { | ||
"target": "b-vendor-bootstrap.js", | ||
"contain": ["**/bootstrap.js"] | ||
}], | ||
"css": [{ | ||
"target": "vendor-bootstrap.css", | ||
"contain": ["**/bootstrap.css"] | ||
}, { | ||
"target": "vendor-font-awesome.css", | ||
"contain": ["**/font-awesome.css"] | ||
}] | ||
}, | ||
/** | ||
* 【支持单个文件指定注入到某些页面】 | ||
* (命名规则:assign-{页面名}-{页面名}-{other} | ||
*/ | ||
"lib": { | ||
"available": true, //启用 公共 文件自动化注入 | ||
"css": "*common*", //以common命名的样式文件会注入到所有的页面 | ||
/* | ||
* ---------- 公共脚本打包格式 仅对 生产环境------------ | ||
* 打包文件支持 gulp格式的正则文件名 | ||
* { | ||
* "target": "{排序序号}-common-{打包名称}.js", | ||
* "contain": ["{文件1}", "{文件2}", "{文件3}"] | ||
* } | ||
*/ | ||
"js": [] | ||
}, | ||
/** | ||
* 【支持src目录中的样式及编译后的逻辑脚本自动化注入到对应的页面】 | ||
*/ | ||
"views": true //启用 业务目录 文件自动化注入 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "FEZ DEMO", | ||
"authors": [ | ||
"furic <furic@qq.com>" | ||
], | ||
"description": "Bower第三方工具库自动化管理", | ||
"main": "", | ||
"license": "MIT", | ||
"homepage": "", | ||
"private": true, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"jquery": "^1.12.4", | ||
"bootstrap": "^3.3.7", | ||
"font-awesome": "^4.7.0", | ||
"animate.css": "animate-css#^3.5.2", | ||
"vue": "^2.2.4" | ||
}, | ||
"overrides": { | ||
"bootstrap": { | ||
"main": [ | ||
"dist/css/bootstrap.css", | ||
"dist/js/bootstrap.js", | ||
"dist/fonts/**.*" | ||
] | ||
}, | ||
"font-awesome": { | ||
"main": [ | ||
"css/font-awesome.css", | ||
"fonts/FontAwesome.otf", | ||
"fonts/fontawesome-webfont.eot", | ||
"fonts/fontawesome-webfont.svg", | ||
"fonts/fontawesome-webfont.ttf", | ||
"fonts/fontawesome-webfont.woff", | ||
"fonts/fontawesome-webfont.woff2" | ||
] | ||
}, | ||
"vue": { | ||
"main": [ | ||
"dist/vue.js" | ||
] | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* ================================== | ||
* @ 2017 FEZ 前端自动化模块工程框架 | ||
* https://github.com/furic-zhao/fez | ||
* ================================== */ | ||
|
||
/** | ||
* gulp入口文件 | ||
* 根据项目目录修改此路径 | ||
*/ | ||
import fez from '../.fez'; | ||
fez(); |
Oops, something went wrong.