svgtofont
Advanced tools
Comparing version 3.17.3 to 3.17.4
@@ -14,2 +14,7 @@ "use strict"; | ||
exports.default = async (options = {}) => { | ||
const confPath = path_1.default.join(process.cwd(), '.svgtofontrc'); | ||
if (fs_extra_1.default.pathExistsSync(confPath)) { | ||
const conf = await fs_extra_1.default.readJson(confPath); | ||
options = Object.assign(Object.assign({}, options), conf); | ||
} | ||
const pkgPath = path_1.default.join(process.cwd(), 'package.json'); | ||
@@ -25,7 +30,2 @@ if (fs_extra_1.default.pathExistsSync(pkgPath)) { | ||
} | ||
const confPath = path_1.default.join(process.cwd(), '.svgtofontrc'); | ||
if (fs_extra_1.default.pathExistsSync(confPath)) { | ||
const conf = await fs_extra_1.default.readJson(confPath); | ||
options = Object.assign(Object.assign({}, options), conf); | ||
} | ||
options.dist = options.dist || path_1.default.join(process.cwd(), 'fonts'); | ||
@@ -32,0 +32,0 @@ options.src = options.src || path_1.default.join(process.cwd(), 'svg'); |
{ | ||
"name": "svgtofont", | ||
"version": "3.17.3", | ||
"version": "3.17.4", | ||
"description": "Converts SVG to TTF/EOT/WOFF/WOFF2/SVG format fonts.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://jaywcjlove.github.io/svgtofont/", |
@@ -158,2 +158,8 @@ /// <reference types="./types" /> | ||
export default async (options: SvgToFontOptions = {}) => { | ||
const confPath = path.join(process.cwd(), '.svgtofontrc'); | ||
if (fs.pathExistsSync(confPath)) { | ||
const conf = await fs.readJson(confPath); | ||
options = { ...options, ...conf }; | ||
} | ||
const pkgPath = path.join(process.cwd(), 'package.json'); | ||
@@ -170,8 +176,2 @@ if (fs.pathExistsSync(pkgPath)) { | ||
const confPath = path.join(process.cwd(), '.svgtofontrc'); | ||
if (fs.pathExistsSync(confPath)) { | ||
const conf = await fs.readJson(confPath); | ||
options = { ...options, ...conf }; | ||
} | ||
options.dist = options.dist || path.join(process.cwd(), 'fonts'); | ||
@@ -178,0 +178,0 @@ options.src = options.src || path.join(process.cwd(), 'svg'); |
Sorry, the diff of this file is not supported yet