WIP open file for a while
This commit is contained in:
parent
f937019e42
commit
d280fb9af3
122 changed files with 5702 additions and 10 deletions
18
lib/plugin/ui/spa/ui-spa-style.js
Normal file
18
lib/plugin/ui/spa/ui-spa-style.js
Normal 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');
|
||||
};
|
||||
};
|
||||
})();
|
||||
19
lib/plugin/ui/spa/ui-spa-topcoat-font.js
Normal file
19
lib/plugin/ui/spa/ui-spa-topcoat-font.js
Normal 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});
|
||||
};
|
||||
};
|
||||
})();
|
||||
24
lib/plugin/ui/spa/ui-spa-topcoat.js-old
Normal file
24
lib/plugin/ui/spa/ui-spa-topcoat.js-old
Normal 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});
|
||||
};
|
||||
};
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue