stylus-requires
v0.1.0
Published
Quickly find dependencies in a stylus string
Downloads
12
Readme
stylus-requires
Simple require parser for
Stylus files. Made only to quickly
resolve paths in strings containing @require
.
Modified from TJ's original.
Installation
$ npm install stylus-requires
Example
stylus:
@require './a.styl'
@require './something/here/whoop'
@require "something"
parser output:
[
{
"string": "@require './a.styl'",
"path": "./a.styl",
"index": 0
},
{
"string": "@require './something/here/whoop'",
"path": "./something/here/whoop",
"index": 20
},
{
"string": "@require \"something\"",
"path": "something",
"index": 54
}
]
License
MIT