Comparing version 1.0.17 to 1.1.0
126
gulpfile.js
var gulp = require('gulp'); | ||
var less = require('gulp-less'); | ||
var connect = require('gulp-connect'); | ||
var ejs = require('gulp-ejs'); | ||
var rename = require('gulp-rename'); | ||
var LessPluginAutoPrefix = require('less-plugin-autoprefix'); | ||
// var LessPluginGlob = require('less-plugin-glob'); | ||
var LessPluginInlineUrls = require('less-plugin-inline-urls'); | ||
var autoprefixPlugin = new LessPluginAutoPrefix({browsers: [ | ||
var autoprefixPlugin = new LessPluginAutoPrefix({ | ||
browsers: [ | ||
'> 5%', | ||
'ie >= 8' | ||
]}); | ||
] | ||
}); | ||
var lessDevConfig = { | ||
plugins: [ | ||
// LessPluginGlob, | ||
autoprefixPlugin, | ||
LessPluginInlineUrls | ||
] | ||
plugins: [ | ||
// LessPluginGlob, | ||
autoprefixPlugin, | ||
LessPluginInlineUrls | ||
] | ||
}; | ||
gulp.task('server', function(){ | ||
connect.server({ | ||
root: 'demo', | ||
livereload: true, | ||
port: 8083 | ||
}); | ||
var themes = [ | ||
{ | ||
name: 'alipay', | ||
color: { | ||
brandPrimary: 'rgba(0, 164, 230, 1)', | ||
brandPrimaryLightAlpha: 'rgba(0, 164, 230, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'ant_financial', | ||
color: { | ||
brandPrimary: 'rgba(0, 160, 232, 1)', | ||
brandPrimaryLightAlpha: 'rgba(0, 160, 232, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'ants_daq', | ||
color: { | ||
brandPrimary: 'rgba(0, 160, 232, 1)', | ||
brandPrimaryLightAlpha: 'rgba(0, 160, 232, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'blue', | ||
color: { | ||
brandPrimary: 'rgba(37, 153, 242, 1)', | ||
brandPrimaryLightAlpha: 'rgba(37, 153, 242, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'koubei', | ||
color: { | ||
brandPrimary: 'rgba(226, 71, 14, 1)', | ||
brandPrimaryLightAlpha: 'rgba(226, 71, 14, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'mybank', | ||
color: { | ||
brandPrimary: 'rgba(0, 163, 171, 1)', | ||
brandPrimaryLightAlpha: 'rgba(0, 163, 171, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'orange', | ||
color: { | ||
brandPrimary: 'rgba(243, 115, 39, 1)', | ||
brandPrimaryLightAlpha: 'rgba(243, 115, 39, 0.7)', | ||
}, | ||
}, | ||
{ | ||
name: 'zhima_credit', | ||
color: { | ||
brandPrimary: 'rgba(46, 182, 169, 1)', | ||
brandPrimaryLightAlpha: 'rgba(46, 182, 169, 0.7)', | ||
}, | ||
}, | ||
] | ||
gulp.task('makefiles', function () { | ||
themes.forEach((theme) => { | ||
gulp.src('./templates/theme.less') | ||
.pipe(ejs(theme)) | ||
.pipe(rename(`${theme.name}.less`)) | ||
.pipe(gulp.dest('./theme')); | ||
gulp.src('./templates/*.svg') | ||
.pipe(ejs(theme)) | ||
.pipe(gulp.dest(`./core/svg/${theme.name}`)) | ||
}); | ||
}); | ||
gulp.task('dev-html', function(){ | ||
gulp.src('./demo/*.html') | ||
.pipe(connect.reload()); | ||
gulp.task('server', function () { | ||
connect.server({ | ||
root: 'demo', | ||
livereload: true, | ||
port: 8083 | ||
}); | ||
}); | ||
gulp.task('dev-less', function(){ | ||
return gulp.src(['./demo/demo.less']) | ||
.pipe(less(lessDevConfig)) | ||
.pipe(gulp.dest('./demo/css')) | ||
.pipe(connect.reload()); | ||
gulp.task('dev-html', function () { | ||
gulp.src('./demo/*.html') | ||
.pipe(connect.reload()); | ||
}); | ||
gulp.task('watch', function(){ | ||
gulp.watch(['./demo/*.html'], ['dev-html']); | ||
gulp.watch(['./core/**/*.less', './variables/**/*.less', './demo/demo.less'], ['dev-less']); | ||
gulp.task('dev-less', function () { | ||
return gulp.src(['./demo/demo.less']) | ||
.pipe(less(lessDevConfig)) | ||
.pipe(gulp.dest('./demo/css')) | ||
.pipe(connect.reload()); | ||
}); | ||
gulp.task('default', ['server', 'watch']); | ||
gulp.task('watch', function () { | ||
gulp.watch(['./demo/*.html'], ['dev-html']); | ||
gulp.watch(['./core/**/*.less', './variables/**/*.less', './demo/demo.less'], ['dev-less']); | ||
}); | ||
gulp.task('default', ['server', 'watch', 'dev-less']); |
# history | ||
## 1.1.0 | ||
* `CHANGED` make templates script for theme | ||
* `CHANGED` add `checkbox-partial-checked-disabled.svg` | ||
* `CHANGED` checkbox & radio style change | ||
## 1.0.17 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "kuma-base", | ||
"version": "1.0.17", | ||
"version": "1.1.0", | ||
"description": "base for kuma", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "gulp" | ||
"start": "gulp", | ||
"pub": "gulp makefiles & npm publish" | ||
}, | ||
@@ -22,3 +23,5 @@ "repository": { | ||
"gulp-connect": "^2.3.1", | ||
"gulp-ejs": "^3.0.0", | ||
"gulp-less": "^3.0.5", | ||
"gulp-rename": "^1.2.2", | ||
"less-plugin-autoprefix": "^1.5.1", | ||
@@ -28,3 +31,5 @@ "less-plugin-glob": "^1.1.1", | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"gulp-ejs": "^3.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
170516
172
2673
1
8
+ Addedgulp-ejs@^3.0.0
+ Addedansi-colors@1.1.0(transitive)
+ Addedansi-wrap@0.1.0(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedejs@2.6.1(transitive)
+ Addedextend-shallow@3.0.2(transitive)
+ Addedgulp-ejs@3.3.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-extendable@1.0.1(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedisobject@3.0.1(transitive)
+ Addedplugin-error@1.0.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedreplace-ext@1.0.1(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedthrough2@3.0.2(transitive)
+ Addedutil-deprecate@1.0.2(transitive)