Comments (2)
Whoops. I'll look into this later tonight. For now, you can achieve the same result by calling haml as a function to compile the template, and then calling the resulting function, like this:
fs = require('fs');
haml = require('haml');
content = fs.readFileSync('test.haml','utf-8');
console.log(haml(content)());
from haml-js.
fixed in 0.4.2
from haml-js.
Related Issues (20)
- inconsistent handling of indent HOT 4
- Support :if, :else statements HOT 1
- cli.js needs a #! HOT 2
- Attribute splats HOT 2
- Multiline attributes fail HOT 13
- Haml-js vim plugin
- Convert to Ruby syntax HOT 2
- Fix running JavaScript (-) to specification. PR submitted downstream
- bug: conditional comments don't work HOT 1
- Attribute parsing fails HOT 8
- Attribute with no value is being stripped from output HOT 4
- TypeError: undefined is not a function HOT 7
- Possibility to always prevent HTMLescaping
- Indentation problem HOT 1
- "Unexpected reserved word..." error returned after gulp-haml build HOT 1
- Multiline pipe appears not to be honored HOT 3
- Error behavior inconsistent HOT 3
- :each filter not working
- haml-lang.com is down, update readme HOT 3
- How to split HAML document in multiple smaller ones? HOT 2
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 haml-js.