Comments (4)
ah that is a bug due to implicit block scope. i think i will remove it
as its more trouble than its worth. im away for the next week. but i
wil fix upon my return. you shold be able to do it yourself byremoving
block_scope from the default directive in the main include file.
cheers
On Wednesday, July 20, 2011, mahemoff
[email protected]
wrote:
I tried the following in Express:
var kaffeine = new (require("kaffeine"))();
app.register('.k', {
compile: function(str, options) {
return function(locals) { return kaffeine.compile(str) };
}
});
app.get('/:script.js', function(req, res) {
res.header('Content-Type', 'text/plain');
res.render(req.params.script+".k", { layout: false });
});but I get bad output, e.g. source:
$( () {
$("input").attr("id", () { @name; });
});converts to:
$( ()(function() {
return $("input").attr("id", ()(function() { return this.name; }).call(this));
}).call(this));[the version in index.js is 0.0.6]
Reply to this email directly or view it on GitHub:
#37
from kaffeine.
Thanks, i'll let you know once I've tried that.
from kaffeine.
Hi - I pushed a new version without block scope.
By the way the documentation is out of date (sorry) -- functions are now
written with an arrow syntax, so your example should look like :
$ -> {
$("input").attr "id", -> @name
}
On Wed, Jul 20, 2011 at 6:39 PM, mahemoff <
[email protected]>wrote:
Thanks, i'll let you know once I've tried that.
Reply to this email directly or view it on GitHub:
#37 (comment)
from kaffeine.
Working great, thanks.
from kaffeine.
Related Issues (20)
- Horrible nodejs support HOT 4
- npm install issues
- errs out on switch statement
- for own key in { ... } HOT 15
- "foo['batz']! someArgs" results in Error HOT 2
- @__define(G/S)etter__ doesn't work HOT 1
- Switch statements cause compile errors HOT 7
- Error with double parentheses HOT 4
- Function syntax is ambiguous HOT 3
- Async bug? HOT 3
- Switch/Case bug
- Cannot find module 'optparse' HOT 1
- do/while loops fail to parse
- is this project dead? HOT 9
- Webpage Documentation doesn't seem to match current version HOT 2
- pipe can be used as a variable name HOT 3
- Is there operator overloading HOT 2
- `knode` error
- Support ES6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kaffeine.