[breaking change] rebuild style struct (#2021)

This commit is contained in:
neverland
2018-11-03 21:08:06 +08:00
committed by GitHub
parent a5576762d8
commit 11ce2a602f
165 changed files with 1371 additions and 4729 deletions
+3 -4
View File
@@ -13,10 +13,9 @@ const config = require('../packages/icon/config');
const local = require('../packages/icon/config/template-local');
const iconDir = path.join(__dirname, '../packages/icon');
const cssDir = path.join(__dirname, '../packages/vant-css/src');
const svgDir = path.join(iconDir, 'svg');
const sketch = path.join(iconDir, 'assets/icons.sketch');
const template = path.join(iconDir, 'config/template.css');
const template = path.join(iconDir, 'config/template.tpl');
// get md5 from sketch
const md5 = md5File.sync(sketch).slice(0, 6);
@@ -49,7 +48,7 @@ gulp.task('ttf', () => {
iconfontCss({
fontName: config.name,
path: template,
targetPath: '../vant-css/src/icon.css',
targetPath: '../icon/index.css',
normalize: true,
firstGlyph: 0xf000,
cssClass: ttf // this is a trick to pass ttf to template
@@ -67,7 +66,7 @@ gulp.task('ttf', () => {
gulp.task('default', ['ttf'], () => {
// generate icon-local.css
fs.writeFileSync(
path.join(cssDir, 'icon-local.css'),
path.join(iconDir, 'local.css'),
local(config.name, ttf)
);