0.1.0 • Published 10 years ago

stylus-requires v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

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

0.1.0

10 years ago