style-loader
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -17,2 +17,1 @@ /* | ||
}; | ||
module.exports.seperable = true; |
{ | ||
"name": "style-loader", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "style loader module for webpack", |
@@ -5,2 +5,4 @@ # style loader for webpack | ||
### Simple API | ||
``` javascript | ||
@@ -11,3 +13,3 @@ require("style!raw!./file.css"); | ||
It's recommended to combine it with the [`css`](https://github.com/webpack/css-loader) loader: `require("style!css!./file.css")`. | ||
It's recommended to combine it with the [`css-loader`](https://github.com/webpack/css-loader): `require("style!css!./file.css")`. | ||
@@ -21,4 +23,16 @@ It also possible to add a URL instead of a css string: | ||
### Reference-counted API | ||
``` javascript | ||
var style = require("style/useable!css!./file.css"); | ||
style.use(); // = style.ref(); | ||
style.unuse(); // = style.unref(); | ||
``` | ||
Styles are not added on require, but instead on call to `use`/`ref`. Styles are removed from page if `unuse`/`unref` is called exactly as often as `use`/`ref`. | ||
Note: Behavior is undefined when `unuse`/`unref` is called more often than `use`/`ref`. Don't do that. | ||
## License | ||
MIT (http://www.opensource.org/licenses/mit-license.php) |
@@ -15,2 +15,1 @@ /* | ||
}; | ||
module.exports.seperable = true; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4840
7
100
35