Permalink
Browse files

[ ! ] More fixes to Client Side JS Generation

  • Loading branch information...
pnegri committed Feb 27, 2012
1 parent 18e98c3 commit 228e51d5cce488960c51d297ac899ecff1163707
Showing with 7 additions and 6 deletions.
  1. +6 −5 lib/arcabouco_modules/objectpool.coffee
  2. +1 −1 package.json
@@ -79,6 +79,7 @@ class ArcaboucoObjectPool
baseFilename = baseFilename.replace(".coffee","")
baseFilename = baseFilename.replace(".js","")
target_filename = "#{outputDir}/#{pieceFilenamePrefix}#{baseFilename}.js"
+ target_base_filename = Common.Path.basename( target_filename )
file_exists = false
@@ -89,14 +90,14 @@ class ArcaboucoObjectPool
file_exists = false
unless file_exists
- if pieceFilename.indexOf(".js")
- exec "cp #{pieceFilename} #{target_filename}"
- else if pieceFilename.indexOf(".coffee")
- exec "coffee --compile -p #{pieceFilename} > #{target_filename}.js", [], buildReady
c = c+1
+ if pieceFilename.indexOf(".js") != -1
+ console.log 'copy a js'
+ else if pieceFilename.indexOf(".coffee") != -1
+ exec "coffee --compile -p #{pieceFilename} > #{target_filename}", [], buildReady
application.Content.putContentFor 'head',
- "<script src=\"/cdn/js/#{pieceFilenamePrefix}#{baseFilename}.js\"></script>", { priority: pieceDetails.priority }
+ "<script src=\"/cdn/js/#{target_base_filename}\"></script>", { priority: pieceDetails.priority }
if c == 0
console.log 'JS generation ready'
View
@@ -1,7 +1,7 @@
{
"name" : "arcabouco-js",
"description" : "scalable microframework in node.js",
- "version" : "0.8.6",
+ "version" : "0.8.7",
"author" : "Patrick Negri <patrick@iugu.com.br>",
"homepage": "http://github.com/pnegri/arcabouco-js",
"contributors" : [],

0 comments on commit 228e51d

Please sign in to comment.