Permalink
Browse files

fixes #129, #130

  • Loading branch information...
1 parent a1e8199 commit 9a73e1bf0c861ee2641b78f99a0ba9098450010d @guybedford committed Jan 26, 2014
Showing with 10 additions and 6 deletions.
  1. +3 −1 css-builder.js
  2. +3 −1 css.js
  3. +3 −3 example/build.js
  4. +1 −1 example/test.html
View
@@ -149,17 +149,19 @@ define(['require', './normalize'], function(req, normalize) {
cssAPI.onLayerEnd = function(write, data) {
//calculate layer css
var css = layerBuffer.join('');
+ var outPath = config.appDir ? config.baseUrl + data.name + '.css' : config.out.replace(/(\.js)?$/, '.css');
if (config.separateCSS) {
console.log('Writing CSS! file: ' + data.name + '\n');
- var outPath = config.appDir ? config.baseUrl + data.name + '.css' : config.out.replace(/(\.js)?$/, '.css');
+ css = normalize(css, siteRoot, outPath);
saveFile(outPath, compress(css));
}
else if (config.buildCSS != false) {
if (css == '')
return;
+
write(
"(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n"
+ "('" + escape(compress(css)) + "');\n"
View
@@ -84,8 +84,10 @@ define(function() {
var nextLoad = ieLoads.shift();
- if (!nextLoad)
+ if (!nextLoad) {
+ ieCurCallback = null;
return;
+ }
ieCurCallback = nextLoad[1];
createIeLoad(nextLoad[0]);
View
@@ -14,17 +14,17 @@
modules: [
{
name: 'app',
- exclude: ['core-components'],
+ exclude: ['app/core-components'],
},
{
- name: 'core-components',
+ name: 'app/core-components',
create: true,
include: ['components/component'],
exclude: ['require-css/normalize']
},
{
name: 'popup',
- exclude: ['core-components', 'require-css/normalize']
+ exclude: ['app/core-components', 'require-css/normalize']
}
]
//name: 'app.js',
View
@@ -10,7 +10,7 @@
}
});
</script>
-<script src='core-components.js'></script>
+<script src='app/core-components.js'></script>
<body>
<h1>test</h1>

0 comments on commit 9a73e1b

Please sign in to comment.