mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
284
web/node_modules/@svgr/webpack/CHANGELOG.md
generated
vendored
Normal file
284
web/node_modules/@svgr/webpack/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,284 @@
|
|||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [5.5.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.4.0...v5.5.0) (2020-11-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* prevent removing the namespace by svgr ([[#475](https://github.com/gregberge/svgr/tree/master/packages/webpack/issues/475)](https://github.com/gregberge/svgr/issues/475) ([#498](https://github.com/gregberge/svgr/tree/master/packages/webpack/issues/498)) ([00e84ea](https://github.com/gregberge/svgr/tree/master/packages/webpack/commit/00e84ead96d89bcbd072b9585b4db1365e392d33))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* allow custom name for named export ([#493](https://github.com/gregberge/svgr/tree/master/packages/webpack/issues/493)) ([16a58d6](https://github.com/gregberge/svgr/tree/master/packages/webpack/commit/16a58d6e817c065f72a68be91600a1a360205f44))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.4.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.3.1...v5.4.0) (2020-04-27)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [5.3.1](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.3.0...v5.3.1) (2020-04-05)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.3.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.2.0...v5.3.0) (2020-03-22)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.2.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.1.0...v5.2.0) (2020-02-23)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.1.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.0.1...v5.1.0) (2020-01-20)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [5.0.1](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v5.0.0...v5.0.1) (2019-12-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix engines in package.json ([a45d6fc](https://github.com/gregberge/svgr/tree/master/packages/webpack/commit/a45d6fc8b43402bec60ed4e9273f90fdc65a23a7))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.3.3](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v4.3.2...v4.3.3) (2019-09-24)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.3.2](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v4.3.1...v4.3.2) (2019-07-15)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.3.1](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v4.3.0...v4.3.1) (2019-07-01)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.3.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v4.2.0...v4.3.0) (2019-05-28)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.2.0](https://github.com/gregberge/svgr/tree/master/packages/webpack/compare/v4.1.0...v4.2.0) (2019-04-11)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.1.0](https://github.com/gregberge/svgr/compare/v4.0.4...v4.1.0) (2018-11-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add parcel plugin ([#235](https://github.com/gregberge/svgr/issues/235)) ([144dbe3](https://github.com/gregberge/svgr/commit/144dbe3)), closes [#215](https://github.com/gregberge/svgr/issues/215)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.4](https://github.com/gregberge/svgr/compare/v4.0.3...v4.0.4) (2018-11-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **webpack:** use static babel config ([#240](https://github.com/gregberge/svgr/issues/240)) ([d67af31](https://github.com/gregberge/svgr/commit/d67af31)), closes [#232](https://github.com/gregberge/svgr/issues/232)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.3](https://github.com/gregberge/svgr/compare/v4.0.2...v4.0.3) (2018-11-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* upgrade dependencies ([7e2195f](https://github.com/gregberge/svgr/commit/7e2195f))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.2](https://github.com/gregberge/svgr/compare/v4.0.1...v4.0.2) (2018-11-08)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.1](https://github.com/gregberge/svgr/compare/v4.0.0...v4.0.1) (2018-11-08)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.0.0](https://github.com/gregberge/svgr/compare/v3.1.0...v4.0.0) (2018-11-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* prevent babel read babel.config.js ([#206](https://github.com/gregberge/svgr/issues/206)) ([514d43d](https://github.com/gregberge/svgr/commit/514d43d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **svgo:** prefix ids by default ([06c338d](https://github.com/gregberge/svgr/commit/06c338d)), closes [#210](https://github.com/gregberge/svgr/issues/210)
|
||||
* **v4:** new architecture ([ac8b8ca](https://github.com/gregberge/svgr/commit/ac8b8ca))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **v4:** - `template` option must now returns a Babel AST
|
||||
- `@svgr/core` does not include svgo & prettier by default
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.1.0](https://github.com/gregberge/svgr/compare/v3.0.0...v3.1.0) (2018-10-05)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="3.0.0"></a>
|
||||
# [3.0.0](https://github.com/gregberge/svgr/compare/v2.4.1...v3.0.0) (2018-10-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **webpack:** forward filePath in webpack loader ([b7a108e](https://github.com/gregberge/svgr/commit/b7a108e)), closes [#177](https://github.com/gregberge/svgr/issues/177) [#188](https://github.com/gregberge/svgr/issues/188)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* always prefix component name with "Svg" ([f71aa7a](https://github.com/gregberge/svgr/commit/f71aa7a)), closes [#190](https://github.com/gregberge/svgr/issues/190)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **webpack:** runtime configuration is now loaded using webpack
|
||||
loader.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.4.1"></a>
|
||||
## [2.4.1](https://github.com/gregberge/svgr/compare/v2.4.0...v2.4.1) (2018-09-16)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.4.0"></a>
|
||||
# [2.4.0](https://github.com/gregberge/svgr/compare/v2.3.0...v2.4.0) (2018-09-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **upgrade:** h2x@1.1.0 (jsdom@12.0.0) & others ([2d9b7bd](https://github.com/gregberge/svgr/commit/2d9b7bd))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.3.0"></a>
|
||||
# [2.3.0](https://github.com/gregberge/svgr/compare/v2.2.1...v2.3.0) (2018-09-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* upgrade to Babel v7 ([7bc908d](https://github.com/gregberge/svgr/commit/7bc908d))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.2.1"></a>
|
||||
## [2.2.1](https://github.com/gregberge/svgr/compare/v2.2.0...v2.2.1) (2018-08-16)
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.2.0"></a>
|
||||
# [2.2.0](https://github.com/gregberge/svgr/compare/v2.1.1...v2.2.0) (2018-08-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **webpack:** use source when possible ([#139](https://github.com/gregberge/svgr/issues/139)) ([ae9965d](https://github.com/gregberge/svgr/commit/ae9965d))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.1.1"></a>
|
||||
## [2.1.1](https://github.com/gregberge/svgr/compare/v2.1.0...v2.1.1) (2018-07-11)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
||||
|
||||
<a name="2.1.0"></a>
|
||||
# [2.1.0](https://github.com/gregberge/svgr/compare/v2.0.0...v2.1.0) (2018-07-08)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package @svgr/webpack
|
7
web/node_modules/@svgr/webpack/LICENSE
generated
vendored
Normal file
7
web/node_modules/@svgr/webpack/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
Copyright 2017 Smooth Code
|
||||
|
||||
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.
|
125
web/node_modules/@svgr/webpack/README.md
generated
vendored
Normal file
125
web/node_modules/@svgr/webpack/README.md
generated
vendored
Normal file
|
@ -0,0 +1,125 @@
|
|||
# @svgr/webpack
|
||||
|
||||
[](https://travis-ci.org/gregberge/svgr)
|
||||
[](https://www.npmjs.com/package/@svgr/webpack)
|
||||
[](https://github.com/gregberge/svgr/blob/master/LICENSE)
|
||||
|
||||
Webpack loader for SVGR.
|
||||
|
||||
```
|
||||
npm install @svgr/webpack --save-dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
In your `webpack.config.js`:
|
||||
|
||||
```js
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: ['@svgr/webpack'],
|
||||
}
|
||||
```
|
||||
|
||||
In your code:
|
||||
|
||||
```js
|
||||
import Star from './star.svg'
|
||||
|
||||
const App = () => (
|
||||
<div>
|
||||
<Star />
|
||||
</div>
|
||||
)
|
||||
```
|
||||
|
||||
### Passing options
|
||||
|
||||
```js
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: [
|
||||
{
|
||||
loader: '@svgr/webpack',
|
||||
options: {
|
||||
native: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
### Using with `url-loader` or `file-loader`
|
||||
|
||||
It is possible to use it with [`url-loader`](https://github.com/webpack-contrib/url-loader) or [`file-loader`](https://github.com/webpack-contrib/file-loader).
|
||||
|
||||
In your `webpack.config.js`:
|
||||
|
||||
```js
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: ['@svgr/webpack', 'url-loader'],
|
||||
}
|
||||
```
|
||||
|
||||
In your code:
|
||||
|
||||
```js
|
||||
import starUrl, { ReactComponent as Star } from './star.svg'
|
||||
|
||||
const App = () => (
|
||||
<div>
|
||||
<img src={starUrl} alt="star" />
|
||||
<Star />
|
||||
</div>
|
||||
)
|
||||
```
|
||||
|
||||
The named export defaults to `ReactComponent`, but can be customized with the `namedExport` option.
|
||||
|
||||
### Use your own Babel configuration
|
||||
|
||||
By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configuration](https://github.com/gregberge/svgr/blob/master/packages/webpack/src/index.js). In some case you may want to apply a custom one (if you are using Preact for an example). You can turn off Babel transformation by specifying `babel: false` in options.
|
||||
|
||||
```js
|
||||
// Example using preact
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['preact', 'env'],
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: '@svgr/webpack',
|
||||
options: { babel: false },
|
||||
}
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
### Handle SVG in CSS, Sass or Less
|
||||
|
||||
It is possible to detect the module that requires your SVG using [`Rule.issuer`](https://webpack.js.org/configuration/module/#rule-issuer) in Webpack. Using it you can specify two different configurations for JavaScript and the rest of your files.
|
||||
|
||||
```js
|
||||
[
|
||||
{
|
||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||
issuer: {
|
||||
test: /\.jsx?$/
|
||||
},
|
||||
use: ['babel-loader', '@svgr/webpack', 'url-loader']
|
||||
},
|
||||
{
|
||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||
loader: 'url-loader'
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
82
web/node_modules/@svgr/webpack/lib/index.js
generated
vendored
Normal file
82
web/node_modules/@svgr/webpack/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _loaderUtils = require("loader-utils");
|
||||
|
||||
var _core = require("@babel/core");
|
||||
|
||||
var _core2 = _interopRequireDefault(require("@svgr/core"));
|
||||
|
||||
var _pluginSvgo = _interopRequireDefault(require("@svgr/plugin-svgo"));
|
||||
|
||||
var _pluginJsx = _interopRequireDefault(require("@svgr/plugin-jsx"));
|
||||
|
||||
var _presetReact = _interopRequireDefault(require("@babel/preset-react"));
|
||||
|
||||
var _presetEnv = _interopRequireDefault(require("@babel/preset-env"));
|
||||
|
||||
var _pluginTransformReactConstantElements = _interopRequireDefault(require("@babel/plugin-transform-react-constant-elements"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const babelOptions = {
|
||||
babelrc: false,
|
||||
configFile: false,
|
||||
presets: [(0, _core.createConfigItem)(_presetReact.default, {
|
||||
type: 'preset'
|
||||
}), (0, _core.createConfigItem)([_presetEnv.default, {
|
||||
modules: false
|
||||
}], {
|
||||
type: 'preset'
|
||||
})],
|
||||
plugins: [(0, _core.createConfigItem)(_pluginTransformReactConstantElements.default)]
|
||||
};
|
||||
|
||||
function svgrLoader(source) {
|
||||
const callback = this.async();
|
||||
const {
|
||||
babel = true,
|
||||
...options
|
||||
} = (0, _loaderUtils.getOptions)(this) || {};
|
||||
|
||||
const readSvg = () => new Promise((resolve, reject) => {
|
||||
this.fs.readFile(this.resourcePath, (err, result) => {
|
||||
if (err) reject(err);
|
||||
resolve(result);
|
||||
});
|
||||
});
|
||||
|
||||
const previousExport = (() => {
|
||||
if (source.toString('utf-8').startsWith('export ')) {
|
||||
return source;
|
||||
}
|
||||
|
||||
const exportMatches = source.toString('utf-8').match(/^module.exports\s*=\s*(.*)/);
|
||||
return exportMatches ? `export default ${exportMatches[1]}` : null;
|
||||
})();
|
||||
|
||||
const tranformSvg = svg => (0, _core2.default)(svg, options, {
|
||||
caller: {
|
||||
name: '@svgr/webpack',
|
||||
previousExport,
|
||||
defaultPlugins: [_pluginSvgo.default, _pluginJsx.default]
|
||||
},
|
||||
filePath: this.resourcePath
|
||||
}).then(jsCode => {
|
||||
if (!babel) return jsCode;
|
||||
return (0, _core.transformAsync)(jsCode, babelOptions).then(({
|
||||
code
|
||||
}) => code);
|
||||
}).then(result => callback(null, result)).catch(err => callback(err));
|
||||
|
||||
if (previousExport) {
|
||||
readSvg().then(tranformSvg);
|
||||
} else {
|
||||
tranformSvg(source);
|
||||
}
|
||||
}
|
||||
|
||||
var _default = svgrLoader;
|
||||
exports.default = _default;
|
49
web/node_modules/@svgr/webpack/package.json
generated
vendored
Normal file
49
web/node_modules/@svgr/webpack/package.json
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"name": "@svgr/webpack",
|
||||
"description": "SVGR webpack loader.",
|
||||
"version": "5.5.0",
|
||||
"main": "lib/index.js",
|
||||
"repository": "https://github.com/gregberge/svgr/tree/master/packages/webpack",
|
||||
"author": "Greg Bergé <berge.greg@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"keywords": [
|
||||
"svgr",
|
||||
"svg",
|
||||
"react",
|
||||
"webpack",
|
||||
"webpack-loader"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"homepage": "https://react-svgr.com",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/gregberge"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"prebuild": "rm -rf lib/",
|
||||
"build": "babel --config-file ../../babel.config.js -d lib --ignore \"**/*.test.js\" src",
|
||||
"prepublishOnly": "yarn run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.12.3",
|
||||
"@babel/plugin-transform-react-constant-elements": "^7.12.1",
|
||||
"@babel/preset-env": "^7.12.1",
|
||||
"@babel/preset-react": "^7.12.5",
|
||||
"@svgr/core": "^5.5.0",
|
||||
"@svgr/plugin-jsx": "^5.5.0",
|
||||
"@svgr/plugin-svgo": "^5.5.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-loader": "^8.2.1",
|
||||
"memory-fs": "^0.5.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.4.0"
|
||||
},
|
||||
"gitHead": "b5920550bd966f876cb65c5e23af180461e5aa23"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue