stylus-requires

0.1.0 • Public • Published

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

/stylus-requires/

    Package Sidebar

    Install

    npm i stylus-requires

    Weekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • mvanasse