Browse files

use css

  • Loading branch information...
1 parent bfe40d0 commit ec0b72f6643c8914c6d863c8a7fcd8e70913088b @lepture lepture committed Apr 22, 2013
Showing with 8 additions and 0 deletions.
  1. +1 −0 templates/snippet/head.html
  2. +7 −0 theme.js
View
1 templates/snippet/head.html
@@ -94,6 +94,7 @@
{%- if pkg.spm.alias %}
seajs.config({ alias: {{pkg.spm.alias|clean_alias|json_encode}}});
{%- endif %}
+ seajs.use({{pkg.spm.alias|css_alias|json_encode}});
{%- if pkg.spm.devAlias %}
seajs.config({ alias: {{pkg.spm.devAlias|clean_alias|json_encode}}});
View
7 theme.js
@@ -80,6 +80,13 @@ exports.filters = {
});
return alias;
},
+ css_alias: function(alias) {
+ return Object.keys(alias).map(function(key) {
+ return alias[key];
+ }).filter(function(val) {
+ return /\.css$/.test(val);
+ });
+ },
render_src: function(writer) {
var base = path.relative(path.dirname(writer.filepath), '');
var ret = findSrc(base);

0 comments on commit ec0b72f

Please sign in to comment.