2
0
Fork 0

WIP open file for a while

This commit is contained in:
Willem 2017-06-10 16:53:29 +02:00
parent f937019e42
commit d280fb9af3
122 changed files with 5702 additions and 10 deletions

View file

@ -0,0 +1,18 @@
module.exports = (function () {
return function UISpaStylePlugin() {
this.configPlugin = function (ctx) {
ctx.key='uiSpaStyle';
ctx.description='Adds basic styling resources.';
ctx.dependencies.push('uiSpaTopcoatFont');
};
this.configServer = function(ctx) {
ctx.hostTemplateCSS('css/flot');
ctx.hostTemplateCSS('css/panel');
ctx.hostTemplateCSS('css/style');
};
};
})();

View file

@ -0,0 +1,19 @@
module.exports = (function () {
var fontPath = 'topcoat-fonts/font/SourceSansPro/';
return function UISpaTopcoatFontPlugin() {
this.configPlugin = function (ctx) {
ctx.key='uiSpaTopcoatFont';
ctx.description='Adds Source Sans Pro fonts.';
};
this.configServer = function(ctx) {
ctx.hostFileCSSFontNodeModule({file: 'SourceSansPro-Light.otf', path: fontPath, fontFamily: 'Source Sans', fontWeight: 200});
ctx.hostFileCSSFontNodeModule({file: 'SourceSansPro-Regular.otf', path: fontPath, fontFamily: 'Source Sans', fontWeight: 400});
ctx.hostFileCSSFontNodeModule({file: 'SourceSansPro-Semibold.otf',path: fontPath, fontFamily: 'Source Sans', fontWeight: 600});
};
};
})();

View file

@ -0,0 +1,24 @@
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});
};
};
})();