aboutsummaryrefslogtreecommitdiff
path: root/node_modules/json-loader/README.md
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/json-loader/README.md
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/json-loader/README.md')
-rw-r--r--node_modules/json-loader/README.md88
1 files changed, 77 insertions, 11 deletions
diff --git a/node_modules/json-loader/README.md b/node_modules/json-loader/README.md
index 45da09feb..199d62536 100644
--- a/node_modules/json-loader/README.md
+++ b/node_modules/json-loader/README.md
@@ -1,19 +1,85 @@
-# json loader for webpack
+[![npm][npm]][npm-url]
+[![node][node]][node-url]
+[![deps][deps]][deps-url]
+[![tests][tests]][tests-url]
+[![coverage][cover]][cover-url]
+[![chat][chat]][chat-url]
-## Installation
+<div align="center">
+ <img width="160" height="180"
+ src="https://worldvectorlogo.com/logos/json.svg">
+ <a href="https://github.com/webpack/webpack">
+ <img width="200" height="200"
+ src="https://webpack.js.org/assets/icon-square-big.svg">
+ </a>
+ <h1>JSON Loader</h1>
+</div>
-`npm install json-loader`
+<h2 align="center">Install</h2>
-## Usage
+```bash
+npm install --save-dev json-loader
+```
+
+> ⚠️ **Since `webpack >= v2.0.0`, importing of JSON files will work by default. You might still want to use this if you use a custom file extension. See the [v1.0.0 -> v2.0.0 Migration Guide](https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore) for more information**
+
+<h2 align="center">Usage</h2>
+
+### `Inline`
-``` javascript
-var json = require("json!./file.json");
-// => returns file.json content as json parsed object
+```js
+const json = require('json-loader!./file.json');
```
-Don't forget to polyfill `require` if you want to use it in node.
-See `webpack` documentation.
+### `Configuration` (recommended)
+
+```js
+const json = require('./file.json');
+```
+
+**webpack.config.js**
+```js
+module.exports = {
+ module: {
+ loaders: [
+ {
+ test: /\.json$/,
+ loader: 'json-loader'
+ }
+ ]
+ }
+}
+```
+
+<h2 align="center">Maintainer</h2>
+
+<table>
+ <tbody>
+ <tr>
+ <td align="center">
+ <img width="150" height="150" src="https://avatars.githubusercontent.com/sokra?v=3">
+ </br>
+ <a href="https://github.com/sokra">Tobias Koppers</a>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+[npm]: https://img.shields.io/npm/v/json-loader.svg
+[npm-url]: https://npmjs.com/package/json-loader
+
+[node]: https://img.shields.io/node/v/json-loader.svg
+[node-url]: https://nodejs.org
+
+[deps]: https://david-dm.org/webpack/json-loader.svg
+[deps-url]: https://david-dm.org/webpack/json-loader
+
+[tests]: http://img.shields.io/travis/webpack/json-loader.svg
+[tests-url]: https://travis-ci.org/webpack/json-loader
-## License
+[cover]: https://coveralls.io/repos/github/webpack/json-loader/badge.svg
+[cover-url]: https://coveralls.io/github/webpack/json-loader
-MIT (http://www.opensource.org/licenses/mit-license.php)
+[chat]: https://badges.gitter.im/webpack/webpack.svg
+[chat-url]: https://gitter.im/webpack/webpack