[Doc] classify icons (#2161)

This commit is contained in:
neverland
2018-11-27 17:06:09 +08:00
committed by GitHub
parent 0c51c3c9e7
commit ac29448ce2
3 changed files with 50 additions and 43 deletions
+2 -5
View File
@@ -33,7 +33,7 @@ const prevTTFs = glob.sync(path.join(iconDir, '*.ttf'));
prevTTFs.forEach(ttf => fs.removeSync(ttf));
// rename svg
const icons = [].concat(config.glyphs, config.basic);
const icons = [...config.basic, ...config.outline, ...config.filled];
icons.forEach((icon, index) => {
const src = path.join(svgDir, icon.src);
if (fs.existsSync(src)) {
@@ -66,10 +66,7 @@ gulp.task('ttf', () => {
gulp.task('default', ['ttf'], () => {
// generate icon-local.css
fs.writeFileSync(
path.join(iconDir, 'local.less'),
local(config.name, ttf)
);
fs.writeFileSync(path.join(iconDir, 'local.less'), local(config.name, ttf));
// remove svg
fs.removeSync(svgDir);