stylus-bundle
Bundles all SCSS imports into a single file recursively. This is a fork of scss-bundle which now only supports non-cli usage. Any help appreciated.
Non-CLI usage
This package now supports only non-CLI usage.
Simple example
;; ;
API
Bundler
;
Constructor
constructorfileRegistry: FileRegistry = , projectDirectory?: string
Arguments
fileRegistry?:
Registry - Dictionary of files contents by full pathprojectDirectory?: string
- Absolute project location, wherenode_modules
are located. Used for resolving tilde imports
Methods
bundle
public async bundlefile: string, fileRegistry: Registry = : Promise<BundleResult>
Arguments
file: string
- Main file full pathfileRegistry:
Registry - Dictionary of files contents by full path
Returns
Promise<
BundleResult>
Contracts
BundleResult
;
Properties
imports:
BundleResult[]
- File imports arraytilde?: boolean
- Used tilde importfilePath: string
- Full file pathcontent: string
- File contentfound: boolean
- Is file found
Registry
;
Key
id: string
- File full path as dictionary id
Value
string | undefined
- File content
License
Released under the MIT license.