Socket
Socket
Sign inDemoInstall

blade

Package Overview
Dependencies
2
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-alpha1 to 3.0.0-alpha2

6

meteor/package.js

@@ -60,4 +60,4 @@ var path = require('path');

path: "/views/" + templateName + ".js", //This can be changed to whatever
data: new Buffer("blade.cachedViews[" +
//just put the template itself in blade.cachedViews
data: new Buffer("blade._cachedViews[" +
//just put the template itself in blade._cachedViews
JSON.stringify(templateName + ".blade") + "]=" + tmpl.toString() + ";" +

@@ -76,3 +76,3 @@ //define a template with the proper name

there is no async. All code is ran synchronously. */
"var ret = ''; blade.cachedViews[" + JSON.stringify(templateName + ".blade") +
"var ret = ''; blade._cachedViews[" + JSON.stringify(templateName + ".blade") +
"](data, function(err,html) {" +

@@ -79,0 +79,0 @@ "if(err) throw err; ret = html;" +

@@ -7,5 +7,5 @@ blade.Runtime.loadTemplate = function(baseDir, filename, compileOptions, cb) {

filename = blade.Runtime.resolve(filename);
if(blade.cachedViews[filename])
if(blade._cachedViews[filename])
{
cb(null, blade.cachedViews[filename]);
cb(null, blade._cachedViews[filename]);
return true;

@@ -15,2 +15,5 @@ }

return false;
};
};
if(Spark)
for(var i in Spark)
blade.LiveUpdate[i] = Spark[i];

@@ -18,3 +18,3 @@ {

],
"version": "3.0.0-alpha1",
"version": "3.0.0alpha2",
"homepage": "https://github.com/bminer/node-blade",

@@ -50,2 +50,2 @@ "repository": {

]
}
}

@@ -908,5 +908,32 @@ Blade - HTML Template Compiler

### Isolates
Isolates are only useful when using a live page update engine. Creating an isolate
ensures that if data dependencies relating only to that isolate are updated, then only
the part of the template within isolate will be re-rendered. All other parts of the
Blade template will *not* be re-rendered.
Example (using Meteor):
```
- console.log("Rendering header...")
h1 This is a header
isolate
p The current user is: #{Session.get("user")}
```
In the example above, "Rendering header..." will be printed to the console when the
whole template is rendered, but if the reactive variable is updated using
`Session.set("user", ...)`, only the isolate will be re-rendered. In this case,
nothing will print to the console.
Note: As with Blade functions, any [blocks](#blocks) defined within an isolate will be
deleted and unaccessible outside the isolate block.
See [Reactivity isolation](http://docs.meteor.com/#isolate) on the Meteor documentation
for more details.
### Chunks
#### Chunks are deprecated as of Blade 3.0
#### Chunks are *deprecated* as of Blade 3.0. You should use [isolates](#isolates) instead.

@@ -913,0 +940,0 @@ Chunks are simply functions that return HTML. They behave a bit differently than

@@ -6,6 +6,6 @@ {

"homepage": "https://github.com/bminer/node-blade",
"version": "3.0.0-alpha1",
"version": "3.0.0alpha2",
"git": "https://github.com/bminer/node-blade.git",
"packages": {
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc