Skip to content

Releases: cheton/browserify-css

v0.9.2

01 Sep 09:47

Choose a tag to compare

Enhancements

Adds an insertAt parameter to the autoInject option that can insert or append <style> elements to the beginning or end of head (resolves #40)

Insert at top:

"autoInjectOptions": {
    "insertAt": "top"
}

Insert at bottom:

"autoInjectOptions": {
    "insertAt": "bottom"
}

v0.9.1

15 Mar 07:01

Choose a tag to compare

This update contains bug fixes for:

  • #35 Custom function processRelativeUrl not working for the rules inside @media block (PR #36 by @yuezk)

v0.9.0

04 Feb 11:27

Choose a tag to compare

This update adds a onFlush option which resolved the following issues:

  • Add another metadata on the injected style tag #28
  • Question about the embedding of CSS in the bundle #32

https://github.com/cheton/browserify-css#onflush

// @param {object} options The options object
// @param {string} options.filename The filename
// @param {string} options.data The CSS file content
// @param {string} options.rootDir The root directory
// @param {string} options.relativePath The relative path
// @param {string} options.href The href attribute
// @param {function} done The done callback
onFlush: function(options, done) {
    // Method 1:
    // This will keep original module.exports unchanged
    done();

    // Method 2:
    // Pass a null value to the done callback if you do not want to embed CSS into a JavaScript bundle
    done(null);

    // Method 3:
    // Pass a text string to the done callback to customize module.exports
    done('module.exports = ' + JSON.stringify(options.data) + ';');
}

v0.8.4

29 Dec 16:28

Choose a tag to compare

This update contains a bug fix for:
#27 Does not correctly join paths on Windows

v0.8.3

16 Dec 05:43

Choose a tag to compare

Merge PR #25 - Catch and emit exceptions

v0.8.2

04 Dec 11:20

Choose a tag to compare

Added code coverage tests

v0.8.1

04 Nov 13:49

Choose a tag to compare

Uses find-node-modules to find the import path from parent node_modules

v0.8.0

03 Nov 09:09

Choose a tag to compare

This release contains an enhancement for :

[PR] #21 adding support for deduped node modules

v0.7.1

08 Sep 04:10

Choose a tag to compare

This release contains an enhancement for :

v0.7.0

08 Sep 02:36

Choose a tag to compare

This release contains a new feature:

  • Adds rebaseUrls option to allow disabling URLs rebasing.

    See pull request #19