mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-04-13 17:11:57 +02:00
Add autoprefixer to the build chain.
This commit is contained in:
parent
65ca06e7ea
commit
d4a72b1b11
25
mkrfile.js
25
mkrfile.js
@ -29,6 +29,29 @@ function getBuildSuffix(callback) {
|
||||
}
|
||||
|
||||
|
||||
$.fn.autoprefixer = function (options) {
|
||||
|
||||
var autoprefixer = require('autoprefixer-core');
|
||||
var options = {browsers: ['last 2 version']};
|
||||
|
||||
return this.edit(function (blob) {
|
||||
|
||||
try {
|
||||
blob.content = autoprefixer.process(blob.content, options).css;
|
||||
} catch (e) {
|
||||
fQuery.report({
|
||||
type: 'err',
|
||||
method: 'autoprefixer',
|
||||
message: e.message,
|
||||
fquery: this,
|
||||
blob: blob,
|
||||
err: e
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$.plugin('fquery-cssmin');
|
||||
$.plugin('fquery-handlebars');
|
||||
$.plugin('fquery-includeit');
|
||||
@ -109,6 +132,7 @@ module.exports = function (suite) {
|
||||
$(src + ': _h5ai/client/css/*.less')
|
||||
.newerThan(mapSrc, $(src + ': _h5ai/client/css/**'))
|
||||
.less()
|
||||
.autoprefixer()
|
||||
.cssmin()
|
||||
.wrap(header)
|
||||
.write(mapSrc, true);
|
||||
@ -148,6 +172,7 @@ module.exports = function (suite) {
|
||||
$(src + ': _h5ai/client/css/*.less')
|
||||
.newerThan(mapSrc, $(src + ': _h5ai/client/css/**'))
|
||||
.less()
|
||||
.autoprefixer()
|
||||
// .cssmin()
|
||||
.wrap(header)
|
||||
.write(mapSrc, true);
|
||||
|
@ -16,6 +16,7 @@
|
||||
"test": "mocha --recursive test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer-core": "~5.1.8",
|
||||
"fquery": "~0.16.2",
|
||||
"fquery-cssmin": "~0.3.0",
|
||||
"fquery-handlebars": "~0.2.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user