1.1.2 • Published 7 years ago

css-region-rebase v1.1.2

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

css-region-rebase

NPM version Build Status Dependency Status Coverage percentage

Rebase your CSS assets based on comment regions.

Think about what you can do when combining this with node-sass importer feature...^^

Installation

npm install css-region-rebase

Example

From:

/* region cssRebase: /path/to/rebase/your/assets/to */
.foo {
    background: url(./foo.png);
}
/* endregion cssRebase: /path/to/rebase/your/assets/to */

To:

/* region cssRebase: /path/to/rebase/your/assets/to */
.foo {
    background: url(/path/to/rebase/your/assets/to/foo.png);
}
/* endregion cssRebase: /path/to/rebase/your/assets/to */

API

let Rebaser = require('css-region-rebase')

rebaser = new Rebaser(opts={})

Return an object transform stream rebaser that expects entry filenames.

Optionally pass in some opts:

  • opts.format - the format used by your region. Defaults to cssRebase:.

Events

In addition to the usual events emitted by node.js streams, css-region-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

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago