Skip to content

Commit

Permalink
修复新版本font-spider兼容问题
Browse files Browse the repository at this point in the history
  • Loading branch information
糖饼 committed Apr 16, 2016
1 parent 0587f1d commit 2273e06
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
20 changes: 11 additions & 9 deletions README.md
Expand Up @@ -61,34 +61,36 @@ gulp.task('defualt', ['fontspider']);

### options

```javascript
``` javascript
{
/**
* 忽略加载的文件规则 - 与 resourceIgnore 参数互斥
* @see https://github.com/kaelzhang/node-ignore
* 忽略加载的文件规则(支持正则) - 与 `resourceIgnore` 参数互斥
* @type {Array<String>}
*/
ignore: [],

/**
* 映射的文件规则-可以将远程字体文件映射到本地来(支持正则)
* 映射的文件规则(支持正则) - 与 `resourceMap` 参数互斥 - 可以将远程字体文件映射到本地来
* @type {Array<Array<String>>}
* @example [['http://font-spider.org/font', __diranme + '/font'], ...]
*/
map: [],

/**
* 是否支持备份原字体
* @type {Boolean}
*/
backup: true,

/**
* 是否对查询到的文本进行去重处理
* @type {Boolean}
*/
unique: true,

/**
* 是否排序查找到的文本
* @type {Boolean}
*/
sort: true,

Expand All @@ -111,27 +113,27 @@ gulp.task('defualt', ['fontspider']);

/**
* 最大的文件加载数量限制
* @tyoe {Number} 数量
* @type {Number} 数量
*/
resourceMaxNumber: 64,

/**
* 是否缓存请求成功的资源
* @return {Object}
* @type {Boolean}
*/
resourceCache: true,

/**
* 映射资源路径 - 与 map 参数互斥
* 映射资源路径 - 与 `map` 参数互斥
* @param {String} 旧文件地址
* @return {String} 新文件地址
*/
resourceMap: function(file) {},

/**
* 忽略资源 - 与 ignore 参数互斥
* 忽略资源 - 与 `ignore` 参数互斥
* @param {String} 文件地址
* @return {Boolean} 如果返回`true`则忽略当当前文件的加载
* @return {Boolean} 如果返回 `true` 则忽略当当前文件的加载
*/
resourceIgnore: function(file) {},

Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -9,7 +9,7 @@ gulp.task('fontSpider', function() {
.pipe(fontSpider({
silent: false,
backup: false,
ignore: ['*.woff2']
ignore: ['\\.woff2$']
}));
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "gulp-font-spider",
"version": "0.3.2",
"version": "0.3.3",
"description": "font-spider for gulp",
"main": "index.js",
"scripts": {
Expand All @@ -18,7 +18,7 @@
"homepage": "https://github.com/aui/gulp-font-spider",
"dependencies": {
"colors": "^1.1.2",
"font-spider": "^1.0.0-beta2",
"font-spider": "^1.0.0-beta3",
"gutil": "^1.6.4",
"through2": "^0.6.5"
},
Expand Down

0 comments on commit 2273e06

Please sign in to comment.