Permalink
Browse files

Fixed buildApp to support CoffeeScript.

  • Loading branch information...
1 parent 2f0bed0 commit 701a381ccf1a7d5da2e22e659f7e7735b8ba78f0 @datakurre datakurre committed Jul 1, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 buildtools/buildtools.js
View
@@ -1322,7 +1322,15 @@ BT.Project = BT.BuildNode.extend({
var javascript = [];
javascriptFiles.forEach(function(p) {
if (path.existsSync(p)) {
- javascript.push(fs.readFileSync(p, 'utf-8'));
+ if (path.extname(p) === '.js') {
+ javascript.push(fs.readFileSync(p, 'utf-8'));
+ }
+ if (path.extname(p) === '.coffee') {
+ (function() {
+ var data = fs.readFileSync(p, 'utf-8');
+ javascript.push(coffee.compile(data, { bare: true }));
+ })();
+ }
}
});
javascript = javascript.join(';\n');

0 comments on commit 701a381

Please sign in to comment.