2
0
Fork 0
tcrud/lib/plugin/ui/spa/ui-spa-topcoat.js-old

25 lines
859 B
Plaintext
Raw Normal View History

2017-06-10 14:53:29 +00:00
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});
};
};
})();