Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-79-npm / stylus / stylus.js
410 bytesRaw
1 | ; |
2 | |
3 | var path = require('path'); |
4 | var stylus = require('stylus'); |
5 | var s = '@require "external.css"'; |
6 | var opts = { filename: 'index.css', paths: [ __dirname ] }; |
7 | var dep = stylus(s, opts).deps()[0]; |
8 | if (path.basename(dep) === 'external.css') { |
9 | stylus.render(s, opts, function (error, css) { |
10 | if (error) return; |
11 | if (css === '@import "external.css";\n') { |
12 | console.log('ok'); |
13 | } |
14 | }); |
15 | } |
16 |
Built with git-ssb-web