[breaking change] rebuild style struct (#2021)
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user