css-comment-rebase
v1.1.0
Published
Rebase your CSS assets based on node-sass source comments.
Downloads
3
Readme
css-comment-rebase
Rebase your CSS assets based on node-sass source comments.
Installation
npm install css-comment-rebase
Example
From:
/* line 2, /path/to/the/scss/source/foo.scss */
.foo {
background: url(./foo.png);
}
To:
/* line 2, /path/to/the/scss/source/foo.scss */
.foo {
background: url(/path/to/the/scss/source/foo.png);
}
API
let Rebaser = require('css-comment-rebase')
rebaser = new Rebaser(opts={})
Return an object transform stream rebaser
that expects entry filenames.
Optionally pass in some opts:
opts.base:
The path the assets should be rebased relatively to. Defaults to
null
.
Events
In addition to the usual events emitted by node.js streams, css-comment-rebase emits the following events:
rebaser.on('rebase', function(file) {})
Every time an asset is rebased, this event fires with the rebased path.
Contributing
- Fork the main repository
- Code
- Implement tests using node-tap
- Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue
License
Apache-2.0 © Eric MORAND