Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / jade / jade.js
398 bytesRaw
1 | ; |
2 | |
3 | // see also express.js |
4 | |
5 | var file = |
6 | 'html\n' + |
7 | ' head\n' + |
8 | ' title!= title\n' + |
9 | ' body\n' + |
10 | ' h1!= message\n'; |
11 | |
12 | var jade = require('jade'); |
13 | var fn = jade.compile(file, {}); |
14 | var html = fn({ title: 'Hey', message: 'Hello there!' }); |
15 | |
16 | if (html === '<html><head><title>Hey</title></head>' + |
17 | '<body><h1>Hello there!</h1></body></html>') { |
18 | console.log('ok'); |
19 | } |
20 |
Built with git-ssb-web