motion
Version:
motion - moving development forward
54 lines (53 loc) • 4.79 kB
JSON
{
"_args": [
[
"style-loader@https://registry.npmjs.org/style-loader/-/style-loader-0.13.0.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "style-loader@0.13.0",
"_id": "style-loader@0.13.0",
"_inCache": true,
"_location": "/style-loader",
"_phantomChildren": {},
"_requested": {
"name": "style-loader",
"raw": "style-loader@https://registry.npmjs.org/style-loader/-/style-loader-0.13.0.tgz",
"rawSpec": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.0.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.0.tgz",
"_shasum": "abac11a20450f3ddea222b44c0c6342a8862db47",
"_shrinkwrap": null,
"_spec": "style-loader@https://registry.npmjs.org/style-loader/-/style-loader-0.13.0.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"name": "Tobias Koppers @sokra"
},
"bugs": {
"url": "https://github.com/webpack/style-loader/issues"
},
"dependencies": {
"loader-utils": "^0.2.7"
},
"description": "style loader module for webpack",
"devDependencies": {
"css-loader": "~0.8.0"
},
"homepage": "https://github.com/webpack/style-loader#readme",
"license": "MIT",
"name": "style-loader",
"optionalDependencies": {},
"readme": "# style loader for webpack\r\n\r\n## Usage\r\n\r\n[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)\r\n\r\n### Simple API\r\n\r\n``` javascript\r\nrequire(\"style!raw!./file.css\");\r\n// => add rules in file.css to document\r\n```\r\n\r\nIt's recommended to combine it with the [`css-loader`](https://github.com/webpack/css-loader): `require(\"style!css!./file.css\")`.\r\n\r\nIt also possible to add a URL instead of a css string:\r\n\r\n``` javascript\r\nrequire(\"style/url!file!./file.css\");\r\n// => add a <link rel=\"stylesheet\"> to file.css to document\r\n```\r\n\r\n### Placeholders\r\n\r\n(experimental)\r\n\r\nWhen using placeholders (see css-loader) the module exports the placeholders object:\r\n\r\n``` js\r\nvar styles = require(\"style!css!./file.css\");\r\nstyle.placeholder1 === \"z849f98ca812bc0d099a43e0f90184\"\r\n```\r\n\r\n### Reference-counted API\r\n\r\n``` javascript\r\nvar style = require(\"style/useable!css!./file.css\");\r\nstyle.use(); // = style.ref();\r\nstyle.unuse(); // = style.unref();\r\n```\r\n\r\nStyles 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`.\r\n\r\nNote: Behavior is undefined when `unuse`/`unref` is called more often than `use`/`ref`. Don't do that.\r\n\r\n### Options\r\n\r\n#### `insertAt`\r\n\r\nBy default, the style-loader appends `<style>` elements to the end of the `<head>` tag of the page. This will cause CSS created by the loader to take priority over CSS already present in the document head. To insert style elements at the beginning of the head, set this query parameter to 'top', e.g. `require('../style.css?insertAt=top')`.\r\n\r\n#### `singleton`\r\n\r\nIf defined, the style-loader will re-use a single `<style>` element, instead of adding/removing individual elements for each required module. **Note:** this option is on by default in IE9, which has strict limitations on the number of style tags allowed on a page. You can enable or disable it with the singleton query parameter (`?singleton` or `?-singleton`).\r\n\r\n## Recommended configuration\r\n\r\nBy convention the reference-counted API should be bound to `.useable.css` and the simple API to `.css` (similar to other file types, i. e. `.useable.less` and `.less`).\r\n\r\nSo the recommended configuration for webpack is:\r\n\r\n``` javascript\r\n{\r\n module: {\r\n loaders: [\r\n { test: /\\.css$/, exclude: /\\.useable\\.css$/, loader: \"style!css\" },\r\n { test: /\\.useable\\.css$/, loader: \"style/useable!css\" }\r\n ]\r\n }\r\n}\r\n```\r\n\r\n**Note** about source maps support and assets referenced with `url`: when style loader is used with ?sourceMap option, the CSS modules will be generated as `Blob`s, so relative paths don't work (they would be relative to `chrome:blob` or `chrome:devtools`). In order for assets to maintain correct paths setting `output.publicPath` property of webpack configuration must be set, so that absolute paths are generated.\r\n\r\n## Install\r\n\r\n`npm install style-loader`\r\n\r\n## License\r\n\r\nMIT (http://www.opensource.org/licenses/mit-license.php)\r\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/webpack/style-loader.git"
},
"version": "0.13.0"
}