From c290fb57cdb9d9a2bac6af307f48485f564dfca3 Mon Sep 17 00:00:00 2001 From: p2pweb-me Date: Sat, 16 Dec 2017 23:05:21 +0800 Subject: [PATCH] Update API.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dirname拼写错误 --- API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 72ceef7..7944693 100644 --- a/API.md +++ b/API.md @@ -41,7 +41,7 @@ fontSpider.compressor(webFonts, options, callback) ``` javascript var fontSpider = require('font-spider'); -fontSpider.spider([__diranme + '/index.html'], { +fontSpider.spider([__dirname + '/index.html'], { silent: false }).then(function(webFonts) { return fontSpider.compressor(webFonts, {backup: true}); @@ -65,7 +65,7 @@ fontSpider.spider([__diranme + '/index.html'], { /** * 映射的文件规则(支持正则) - 与 `resourceMap` 参数互斥 - 可以将远程字体文件映射到本地来 * @type {Array>} - * @example [['http://font-spider.org/font', __diranme + '/font'], ...] + * @example [['http://font-spider.org/font', __dirname + '/font'], ...] */ map: [],