From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/json-loader/.npmignore | 23 +++++++++ node_modules/json-loader/CHANGELOG.md | 55 ++++++++++++++++++++++ node_modules/json-loader/LICENSE | 20 ++++++++ node_modules/json-loader/README.md | 88 ++++++++++++++++++++++++++++++----- node_modules/json-loader/index.js | 21 +++++---- node_modules/json-loader/package.json | 8 +++- 6 files changed, 193 insertions(+), 22 deletions(-) create mode 100644 node_modules/json-loader/.npmignore create mode 100644 node_modules/json-loader/CHANGELOG.md create mode 100644 node_modules/json-loader/LICENSE (limited to 'node_modules/json-loader') 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. + + +## [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)) + + + + +## [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)) + + + + +## [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)) + + + + +## [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 +
+ + + + +

JSON Loader

+
-`npm install json-loader` +

Install

-## 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** + +

Usage

+ +### `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' + } + ] + } +} +``` + +

Maintainer

+ + + + + + + +
+ +
+ Tobias Koppers +
+ + +[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" -- cgit v1.2.3