diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/json-loader | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) | |
download | wallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz |
node_modules
Diffstat (limited to 'node_modules/json-loader')
-rw-r--r-- | node_modules/json-loader/.npmignore | 23 | ||||
-rw-r--r-- | node_modules/json-loader/CHANGELOG.md | 55 | ||||
-rw-r--r-- | node_modules/json-loader/LICENSE | 20 | ||||
-rw-r--r-- | node_modules/json-loader/README.md | 88 | ||||
-rw-r--r-- | node_modules/json-loader/index.js | 21 | ||||
-rw-r--r-- | node_modules/json-loader/package.json | 8 |
6 files changed, 193 insertions, 22 deletions
diff --git a/node_modules/json-loader/.npmignore b/node_modules/json-loader/.npmignore new file mode 100644 index 000000000..739763349 --- /dev/null +++ b/node_modules/json-loader/.npmignore @@ -0,0 +1,23 @@ +/node_modules + +/example/assets + +/test/js +/coverage + +/.idea + +.DS_Store + +logs +*.log +npm-debug.log* +.eslintcache +/dist +/local +/reports +Thumbs.db +.idea +.vscode +*.sublime-project +*.sublime-workspace
\ No newline at end of file diff --git a/node_modules/json-loader/CHANGELOG.md b/node_modules/json-loader/CHANGELOG.md new file mode 100644 index 000000000..6fb4aee9d --- /dev/null +++ b/node_modules/json-loader/CHANGELOG.md @@ -0,0 +1,55 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +<a name="0.5.7"></a> +## [0.5.7](https://github.com/webpack/json-loader/compare/v0.5.6...v0.5.7) (2017-07-22) + + +### Bug Fixes + +* Strip deprecation warning ([#58](https://github.com/webpack/json-loader/issues/58)) ([a2cf6c6](https://github.com/webpack/json-loader/commit/a2cf6c6)) + + + +<a name="0.5.6"></a> +## [0.5.6](https://github.com/webpack/json-loader/compare/v0.5.5...v0.5.6) (2017-07-22) + + +### Bug Fixes + +* **index:** only export CJS modules (`webpack v1.0.0`) && add deprecation warning (`webpack v2.0.0`) ([#55](https://github.com/webpack/json-loader/issues/55)) ([d34395a](https://github.com/webpack/json-loader/commit/d34395a)) + + + +<a name="0.5.5"></a> +## [0.5.5](https://github.com/webpack/json-loader/compare/v0.5.2...v0.5.5) (2017-07-22) + + +### Bug Fixes + +* add `stringify` option to output JSON object as string ([#45](https://github.com/webpack/json-loader/issues/45)) ([dbf1fa5](https://github.com/webpack/json-loader/commit/dbf1fa5)) +* Don't stringify with tabs to improve perf ([ee75f99](https://github.com/webpack/json-loader/commit/ee75f99)), closes [#31](https://github.com/webpack/json-loader/issues/31) +* escape newline/paragraph separators ([#18](https://github.com/webpack/json-loader/issues/18)) ([939a8cb](https://github.com/webpack/json-loader/commit/939a8cb)) +* Remove confusing statement about polyfill ([a06933c](https://github.com/webpack/json-loader/commit/a06933c)), closes [#7](https://github.com/webpack/json-loader/issues/7) + + +### Reverts + +* add `stringify` option to output JSON object as string ([#43](https://github.com/webpack/json-loader/issues/43)) ([#52](https://github.com/webpack/json-loader/issues/52)) ([e528e1d](https://github.com/webpack/json-loader/commit/e528e1d)) + + + +<a name="0.5.4"></a> +## [0.5.4](https://github.com/webpack/json-loader/compare/v0.5.2...v0.5.4) (2017-07-22) + + +### Bug Fixes + +* add `stringify` option to output JSON object as string ([#45](https://github.com/webpack/json-loader/issues/45)) ([bb495b8](https://github.com/webpack/json-loader/commit/bb495b8)) +* escape newline/paragraph separators ([#18](https://github.com/webpack/json-loader/issues/18)) ([e70851e](https://github.com/webpack/json-loader/commit/e70851e)) + + +### Reverts + +* add `stringify` option to output JSON object as string ([#43](https://github.com/webpack/json-loader/issues/43)) ([#52](https://github.com/webpack/json-loader/issues/52)) ([368cf18](https://github.com/webpack/json-loader/commit/368cf18)) diff --git a/node_modules/json-loader/LICENSE b/node_modules/json-loader/LICENSE new file mode 100644 index 000000000..8c11fc728 --- /dev/null +++ b/node_modules/json-loader/LICENSE @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 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
diff --git a/node_modules/json-loader/index.js b/node_modules/json-loader/index.js index a51ba3aeb..ea4f387de 100644 --- a/node_modules/json-loader/index.js +++ b/node_modules/json-loader/index.js @@ -1,10 +1,11 @@ -/*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
-*/
-module.exports = function(source) {
- this.cacheable && this.cacheable();
- var value = typeof source === "string" ? JSON.parse(source) : source;
- this.value = [value];
- return "module.exports = " + JSON.stringify(value, undefined, "\t") + ";";
-}
+module.exports = function (source) { + if (this.cacheable) this.cacheable(); + + var value = typeof source === "string" ? JSON.parse(source) : source; + + value = JSON.stringify(value) + .replace(/\u2028/g, '\\u2028') + .replace(/\u2029/g, '\\u2029'); + + return `module.exports = ${value}`; +} diff --git a/node_modules/json-loader/package.json b/node_modules/json-loader/package.json index 71422c5a6..2bdad4854 100644 --- a/node_modules/json-loader/package.json +++ b/node_modules/json-loader/package.json @@ -1,9 +1,15 @@ { "name": "json-loader", - "version": "0.5.4", + "version": "0.5.7", "author": "Tobias Koppers @sokra", "description": "json loader module for webpack", "license": "MIT", + "scripts": { + "release": "standard-version" + }, + "devDependencies": { + "standard-version": "^4.2.0" + }, "repository": { "type": "git", "url": "https://github.com/webpack/json-loader.git" |