package.json
7.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"_args": [
[
{
"raw": "style-loader@^0.13.1",
"scope": null,
"escapedName": "style-loader",
"name": "style-loader",
"rawSpec": "^0.13.1",
"spec": ">=0.13.1 <0.14.0",
"type": "range"
},
"D:\\100-Projects\\100-AIAHTML5\\400-SOURCECODE\\AIAHTML5.Admin\\node_modules\\@angular\\cli"
]
],
"_from": "style-loader@>=0.13.1 <0.14.0",
"_id": "style-loader@0.13.2",
"_inCache": true,
"_location": "/style-loader",
"_nodeVersion": "6.9.5",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/style-loader-0.13.2.tgz_1487954662208_0.9082186338491738"
},
"_npmUser": {
"name": "d3viant0ne",
"email": "wiens.joshua@gmail.com"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "style-loader@^0.13.1",
"scope": null,
"escapedName": "style-loader",
"name": "style-loader",
"rawSpec": "^0.13.1",
"spec": ">=0.13.1 <0.14.0",
"type": "range"
},
"_requiredBy": [
"/@angular/cli"
],
"_resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.2.tgz",
"_shasum": "74533384cf698c7104c7951150b49717adc2f3bb",
"_shrinkwrap": null,
"_spec": "style-loader@^0.13.1",
"_where": "D:\\100-Projects\\100-AIAHTML5\\400-SOURCECODE\\AIAHTML5.Admin\\node_modules\\@angular\\cli",
"author": {
"name": "Tobias Koppers @sokra"
},
"bugs": {
"url": "https://github.com/webpack/style-loader/issues"
},
"dependencies": {
"loader-utils": "^1.0.2"
},
"description": "style loader module for webpack",
"devDependencies": {
"css-loader": "~0.8.0"
},
"directories": {},
"dist": {
"shasum": "74533384cf698c7104c7951150b49717adc2f3bb",
"tarball": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.2.tgz"
},
"gitHead": "11c54f2c7631e96f38a3a38da90f757fc902da1c",
"homepage": "https://github.com/webpack/style-loader#readme",
"license": "MIT",
"maintainers": [
{
"name": "bebraw",
"email": "bebraw@gmail.com"
},
{
"name": "d3viant0ne",
"email": "wiens.joshua@gmail.com"
},
{
"name": "ericclemmons",
"email": "eric@smarterspam.com"
},
{
"name": "jhnns",
"email": "mail@johannesewald.de"
},
{
"name": "sokra",
"email": "tobias.koppers@googlemail.com"
},
{
"name": "thelarkinn",
"email": "sean.larkin@cuw.edu"
}
],
"name": "style-loader",
"optionalDependencies": {},
"readme": "[![npm][npm]][npm-url]\r\n[![node][node]][node-url]\r\n[![deps][deps]][deps-url]\r\n[![chat][chat]][chat-url]\r\n\r\n<div align=\"center\">\r\n <a href=\"https://github.com/webpack/webpack\">\r\n <img width=\"200\" height=\"200\"\r\n src=\"https://webpack.js.org/assets/icon-square-big.svg\">\r\n </a>\r\n <h1>Style Loader</h1>\r\n</div>\r\n\r\nAdds CSS to the DOM by injecting a `<style>` tag\r\n\r\n<h2 align=\"center\">Install</h2>\r\n\r\n```\r\nnpm install style-loader --save-dev\r\n```\r\n\r\n<h2 align=\"center\">Usage</h2>\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-loader!raw-loader!./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-loader!css-loader!./file.css\")`.\r\n\r\nIt's also possible to add a URL instead of a CSS string:\r\n\r\n``` javascript\r\nrequire(\"style-loader/url!file-loader!./file.css\");\r\n// => add a <link rel=\"stylesheet\"> to file.css to document\r\n```\r\n\r\n### Local scope CSS\r\n\r\n(experimental)\r\n\r\nWhen using [local scope CSS](https://github.com/webpack/css-loader#css-scope) the module exports the generated identifiers:\r\n\r\n``` javascript\r\nvar style = require(\"style-loader!css-loader!./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-loader/useable!css-loader!./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 rules: [\r\n {\r\n test: /\\.css$/,\r\n use: [\r\n { loader: \"style-loader\" },\r\n { loader: \"css-loader\" },\r\n ],\r\n },\r\n {\r\n test: /\\.useable\\.css$/,\r\n use: [\r\n { \r\n loader: \"style-loader\",\r\n options: {\r\n useable: true\r\n },\r\n },\r\n { loader: \"css-loader\" },\r\n ],\r\n },\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<h2 align=\"center\">Contributing</h2>\r\n\r\nDon't hesitate to create a pull request. Every contribution is appreciated. In development you can start the tests by calling `npm test`.\r\n\r\n<h2 align=\"center\">Maintainers</h2>\r\n\r\n<table>\r\n <tbody>\r\n <tr>\r\n <td align=\"center\">\r\n <img width=\"150 height=\"150\"\r\n src=\"https://avatars.githubusercontent.com/sokra?v=3\">\r\n <br />\r\n <a href=\"https://github.com/\">Tobias Koppers</a>\r\n </td>\r\n <td align=\"center\">\r\n <img width=\"150 height=\"150\"\r\n src=\"https://avatars.githubusercontent.com/SpaceK33z?v=3\">\r\n <br />\r\n <a href=\"https://github.com/\">Kees Kluskens</a>\r\n </td>\r\n <tr>\r\n <tbody>\r\n</table>\r\n\r\n\r\n<h2 align=\"center\">LICENSE</h2>\r\n\r\nMIT\r\n\r\n[npm]: https://img.shields.io/npm/v/style-loader.svg\r\n[npm-url]: https://npmjs.com/package/style-loader\r\n\r\n[node]: https://img.shields.io/node/v/style-loader.svg\r\n[node-url]: https://nodejs.org\r\n\r\n[deps]: https://david-dm.org/webpack/style-loader.svg\r\n[deps-url]: https://david-dm.org/webpack/file-loader\r\n\r\n[chat]: https://badges.gitter.im/webpack/webpack.svg\r\n[chat-url]: https://gitter.im/webpack/webpack\r\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/webpack/style-loader.git"
},
"scripts": {},
"version": "0.13.2"
}