Permalink
Browse files

Push to 3.0.2

includes now work for views stored in `/client/views/` (fixes #153)
  • Loading branch information...
1 parent 5021a13 commit 68afeec7752c34ad47a61fe18319f2fbb6ff3913 @bminer committed Mar 14, 2013
Showing with 8 additions and 3 deletions.
  1. +1 −1 meteor/package.js
  2. +5 −0 meteor/runtime-meteor.js
  3. +1 −1 package.json
  4. +1 −1 smart.json
View
@@ -52,7 +52,7 @@ Package.register_extension("blade", function(bundle, srcPath, servePath, where)
templateName = templateName.substr(13);
//Finally, tell the Blade compiler where these views are stored, so that file includes work.
//The location of meteor project = srcPath.substr(0, srcPath.length - servePath.length)
- var basedir = srcPath.substr(0, srcPath.length - servePath.length) + "/views";
+ var basedir = srcPath.substr(0, srcPath.length - servePath.length);
blade.compileFile(srcPath, {
'synchronous': true,
'basedir': basedir,
View
@@ -28,6 +28,11 @@
blade._includeInfo = info;
//Get the name of the included Template
var name = resolveFilename(info.rel + "/" + relFilename);
+ //Remove views/ or client/views/ prefix
+ if(name.substr(0, 6) == "views/")
+ name = name.substr(6);
+ else if(name.substr(0, 13) == "client/views/")
+ name = name.substr(13);
//Remove .blade file extension
if(name.substr(-6) == ".blade")
name = name.substr(0, name.length - 6);
View
@@ -15,7 +15,7 @@
"live binding",
"meteor"
],
- "version": "3.0.1",
+ "version": "3.0.2",
"homepage": "https://github.com/bminer/node-blade",
"repository": {
"type": "git",
View
@@ -3,7 +3,7 @@
"author": "Blake Miner <miner.blake@gmail.com> (http://www.blakeminer.com/)",
"description": "Blade - HTML Template Compiler, inspired by Jade & Haml",
"homepage": "https://github.com/bminer/node-blade",
- "version": "3.0.1",
+ "version": "3.0.2",
"git": "https://github.com/bminer/node-blade.git",
"packages": {
}

0 comments on commit 68afeec

Please sign in to comment.