source: trip-planner-front/node_modules/stylus/test.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 449 bytes
Line 
1var stylus = require('./');
2
3
4const value = `
5$IMG = {
6 temp: {
7 selectors: ("test" "test1")
8 props: {
9 pop: "dies"
10 }
11 }
12}
13
14add-property(name, expr)
15 {name} expr
16
17generateImgClasses()
18 for $img, $obj in $IMG
19 {join(",", $obj.selectors)}
20 for $prop in $IMG
21 add-property($prop, "url(%s)" % $img)
22
23html
24 generateImgClasses()`;
25
26stylus(value).render((err, css) => {
27 if (err) {
28 throw err;
29 }
30 console.log(css);
31});
Note: See TracBrowser for help on using the repository browser.