Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
449 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var stylus = require('./');
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | const value = `
|
---|
| 5 | $IMG = {
|
---|
| 6 | temp: {
|
---|
| 7 | selectors: ("test" "test1")
|
---|
| 8 | props: {
|
---|
| 9 | pop: "dies"
|
---|
| 10 | }
|
---|
| 11 | }
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | add-property(name, expr)
|
---|
| 15 | {name} expr
|
---|
| 16 |
|
---|
| 17 | generateImgClasses()
|
---|
| 18 | for $img, $obj in $IMG
|
---|
| 19 | {join(",", $obj.selectors)}
|
---|
| 20 | for $prop in $IMG
|
---|
| 21 | add-property($prop, "url(%s)" % $img)
|
---|
| 22 |
|
---|
| 23 | html
|
---|
| 24 | generateImgClasses()`;
|
---|
| 25 |
|
---|
| 26 | stylus(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.