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

Readme

Keywords

Package Sidebar

Install

npm i stylus-requires

Weekly Downloads

6

Version

0.1.0

License

MIT

Last publish

Collaborators

  • mvanasse