25 lines
859 B
Plaintext
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});
|
||
|
};
|
||
|
};
|
||
|
})();
|