2
0
Fork 0
tcrud/lib/plugin/ui/spa/ui-spa-topcoat.js-old
2017-06-10 16:53:29 +02:00

25 lines
859 B
Plaintext

module.exports = (function () {
return function UISpaTopcoatPlugin() {
this.configPlugin = function (ctx) {
ctx.key='uiSpaTopcoat';
ctx.description='Adds and hosts topcoat.css as client resource.';
};
this.configServer = function(ctx) {
var filter = {
'(^.*url.*?;)': '', // removed all urls
'(@font[\\s\\S]*?})': '', // remove font-face
'(body[\\s\\S]*?})': '', // remove body
'(^\\s+)': '', // clean up white space
'(\\{[\\s\\/]+\\/.*)': '{', // rm comment on functions
'(^|\\s\\/\\/.*)': '', // rm comment lines
'(\\/\\*[\\s\\*\\!][\\s\\S]*?\\*\\/)': '', // rm comment blocks
};
ctx.hostFileCSSNodeModule({file: 'topcoat-mobile-dark.css',path: 'topcoat/css', filterRegex: filter});
};
};
})();