Skip to content

Commit

Permalink
1、解决 yd-popup 组件中center默认不支持固定高度问题。
Browse files Browse the repository at this point in the history
2、解决 yd-search 组件result传入对象数组导致出错问题。
3、解决 yd-accordion 组件三角形箭头位置颠倒问题。
4、添加发布后的ydui.px.js文件,以方便非rem时使用。
  • Loading branch information
ydcss committed Jan 9, 2018
1 parent f098ae7 commit 4ff8ebd
Show file tree
Hide file tree
Showing 94 changed files with 238 additions and 185 deletions.
41 changes: 40 additions & 1 deletion build/build.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
var gulp = require('gulp');
var cleanCss = require('gulp-clean-css');
var rename = require('gulp-rename');
var through = require('through2');

var replaceRem2Px = function () {
function fn(file, encoding, callback) {
if (file.isNull()) {
return callback(null, file);
}

if (file.isStream()) {
return callback(createError(file, 'Streaming not supported'));
}

let text = file.contents.toString();

if (/\d*\.?\d+rem/.test(text)) {
text = text.replace(/(\d*\.?\d+)rem/g, function (match, m1) {
return parseInt(m1 * 50) + 'px';
});
}

file.contents = new Buffer(text);
callback(null, file);
}

return through.obj(fn);
};

gulp.task('css:base', function () {
gulp.src('../src/styles/base.less')
Expand All @@ -18,10 +44,23 @@ gulp.task('css:ydui', function () {
.pipe(gulp.dest('../dist'));
});

gulp.task('js:ydui', function () {
gulp.src('../dist/ydui.js')
.pipe(replaceRem2Px())
.pipe(rename('ydui.px.js'))
.pipe(gulp.dest('../dist'));
});

gulp.task('copy:ydui', function () {
gulp.src('../dist/ydui.js')
.pipe(rename('ydui.rem.js'))
.pipe(gulp.dest('../dist'));
});

gulp.task('flexible', function () {
gulp.src('../src/ydui.flexible.js')
.pipe(require('gulp-uglify')())
.pipe(gulp.dest('../dist'));
});

gulp.task('default', ['css:base', 'css:ydui', 'flexible']);
gulp.task('default', ['css:base', 'css:ydui', 'js:ydui', 'copy:ydui', 'flexible']);
4 changes: 2 additions & 2 deletions dist/lib.px/accordion/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/actionsheet/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/backtop/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/badge/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/button/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/cell/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/checkbox/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/checklist/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/cityselect/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/countdown/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/lib.px/countup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/lib.px/datetime/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib.px/dialog/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 4ff8ebd

Please sign in to comment.