Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2

12
web/node_modules/extract-text-webpack-plugin/.eslintrc generated vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"env": {
"node": true
},
"rules": {
"strict": 0,
"curly": 0,
"quotes": 0,
"no-shadow": 0,
"no-underscore-dangle": 0
}
}

View File

@@ -0,0 +1,5 @@
1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).
2. If the issue is still there, write a minimal project showing the problem and expected output.
3. Link to the project and mention Node version and OS in your report.
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**

View File

@@ -0,0 +1,4 @@
1. [Read and sign the CLA](https://cla.js.foundation/webpack/webpack.js.org). This needs to be done only once. PRs that haven't signed it won't be accepted.
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
4. Remove these instructions from your PR as they are for your eyes only.

View File

@@ -0,0 +1,3 @@
example/
test/
.gitattributes

View File

@@ -0,0 +1,12 @@
sudo: false
language: node_js
node_js:
- node
- 6
- 4
script: npm run travis
after_success:
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
- cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js
- rm -rf ./coverage

View File

@@ -0,0 +1,59 @@
# 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="2.1.0"></a>
# [2.1.0](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0...v2.1.0) (2017-03-05)
### Features
* The plugin **filename** accepts a function now. [c9a19ad](https://github.com/webpack-contrib/extract-text-webpack-plugin/commit/c9a19ad), closes [#423](https://github.com/webpack-contrib/extract-text-webpack-plugin/pull/423)
<a name="2.0.0"></a>
# [2.0.0](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.3...v2.0.0) (2017-02-24)
<a name="2.0.0-rc.2"></a>
# [2.0.0-rc.2](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2017-01-28)
### Bug Fixes
* **schema:** allow `extract` to accept omit/remove flags ([8ce93d5](https://github.com/webpack/extract-text-webpack-plugin/commit/8ce93d5)), closes [#371](https://github.com/webpack/extract-text-webpack-plugin/issues/371)
* **schema:** connect loader schema with the code properly ([03bb4aa](https://github.com/webpack/extract-text-webpack-plugin/commit/03bb4aa))
* **schema:** emit proper error messages ([70cbd4b](https://github.com/webpack/extract-text-webpack-plugin/commit/70cbd4b))
### Features
* **errors:** show nicer errors if there are extra fields ([76a171d](https://github.com/webpack/extract-text-webpack-plugin/commit/76a171d))
<a name="2.0.0-rc.1"></a>
# [2.0.0-rc.1](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2017-01-28)
### Bug Fixes
* **options:** pass proper loader options to children ([#266](https://github.com/webpack/extract-text-webpack-plugin/issues/266)) ([6abf42d](https://github.com/webpack/extract-text-webpack-plugin/commit/6abf42d))
<a name="2.0.0-rc.0"></a>
# [2.0.0-rc.0](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-beta.5...v2.0.0-rc.0) (2017-01-26)
### Bug Fixes
* **readme:** Incorrect loader configuration ([e477cc7](https://github.com/webpack/extract-text-webpack-plugin/commit/e477cc7))
### Features
* **extract:** return an array of loader objects ([#343](https://github.com/webpack/extract-text-webpack-plugin/issues/343)) ([74b86e0](https://github.com/webpack/extract-text-webpack-plugin/commit/74b86e0))
# 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.

View File

@@ -0,0 +1,70 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var SourceMapSource = require("webpack-sources").SourceMapSource;
var RawSource = require("webpack-sources").RawSource;
function ExtractedModule(identifier, originalModule, source, sourceMap, addtitionalInformation, prevModules) {
this._identifier = identifier;
this._originalModule = originalModule;
this._source = source;
this._sourceMap = sourceMap;
this._prevModules = prevModules;
this.addtitionalInformation = addtitionalInformation;
this.chunks = [];
}
module.exports = ExtractedModule;
ExtractedModule.prototype.getOrder = function() {
// http://stackoverflow.com/a/14676665/1458162
return /^@import url/.test(this._source) ? 0 : 1;
};
ExtractedModule.prototype.addChunk = function(chunk) {
var idx = this.chunks.indexOf(chunk);
if(idx < 0)
this.chunks.push(chunk);
};
ExtractedModule.prototype.removeChunk = function(chunk) {
var idx = this.chunks.indexOf(chunk);
if(idx >= 0) {
this.chunks.splice(idx, 1);
chunk.removeModule(this);
return true;
}
return false;
};
ExtractedModule.prototype.rewriteChunkInReasons = function(oldChunk, newChunks) { };
ExtractedModule.prototype.identifier = function() {
return this._identifier;
};
ExtractedModule.prototype.source = function() {
if(this._sourceMap)
return new SourceMapSource(this._source, null, this._sourceMap);
else
return new RawSource(this._source);
};
ExtractedModule.prototype.getOriginalModule = function() {
return this._originalModule;
};
ExtractedModule.prototype.getPrevModules = function() {
return this._prevModules;
};
ExtractedModule.prototype.addPrevModules = function(prevModules) {
prevModules.forEach(function(m) {
if(this._prevModules.indexOf(m) < 0)
this._prevModules.push(m);
}, this);
};
ExtractedModule.prototype.setOriginalModule = function(originalModule) {
this._originalModule = originalModule;
};

20
web/node_modules/extract-text-webpack-plugin/LICENSE generated vendored Normal file
View File

@@ -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.

View File

@@ -0,0 +1,14 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function OrderUndefinedError(module) {
Error.call(this);
Error.captureStackTrace(this, OrderUndefinedError);
this.name = "OrderUndefinedError";
this.message = "Order in extracted chunk undefined";
this.module = module;
}
module.exports = OrderUndefinedError;
OrderUndefinedError.prototype = Object.create(Error.prototype);

227
web/node_modules/extract-text-webpack-plugin/README.md generated vendored Normal file
View File

@@ -0,0 +1,227 @@
[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![tests][tests]][tests-url]
[![coverage][cover]][cover-url]
[![chat][chat]][chat-url]
<div align="center">
<img width="200" height="200"
src="https://cdn.rawgit.com/webpack-contrib/extract-text-webpack-plugin/574e3200/logo.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>Extract Text Plugin</h1>
</div>
<h2 align="center">Install</h2>
```bash
# for webpack 2
npm install --save-dev extract-text-webpack-plugin
# for webpack 1
npm install --save-dev extract-text-webpack-plugin@1.0.1
```
<h2 align="center">Usage</h2>
> :warning: For webpack v1, see [the README in the webpack-1 branch](https://github.com/webpack/extract-text-webpack-plugin/blob/webpack-1/README.md).
```js
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: "css-loader"
})
}
]
},
plugins: [
new ExtractTextPlugin("styles.css"),
]
}
```
It moves all the `require("style.css")`s in entry chunks into a separate single CSS file. So your styles are no longer inlined into the JS bundle, but separate in a CSS bundle file (`styles.css`). If your total stylesheet volume is big, it will be faster because the CSS bundle is loaded in parallel to the JS bundle.
|Advantages|Caveats|
|:---------|:------|
| Fewer style tags (older IE has a limit) | Additional HTTP request |
| CSS SourceMap (with `devtool: "source-map"` and `extract-text-webpack-plugin?sourceMap`) | Longer compilation time |
| CSS requested in parallel | No runtime public path modification |
| CSS cached separate | No Hot Module Replacement |
| Faster runtime (less code and DOM operations) | ... |
<h2 align="center">Options</h2>
```js
new ExtractTextPlugin(options: filename | object)
```
|Name|Type|Description|
|:--:|:--:|:----------|
|**`id`**|`{String}`|Unique ident for this plugin instance. (For advanced usage only, by default automatically generated)|
|**`filename`**|`{String|Function}`|Name of the result file. May contain `[name]`, `[id]` and `[contenthash]`|
|**`allChunks`**|`{Boolean}`|Extract from all additional chunks too (by default it extracts only from the initial chunk(s))|
|**`disable`**|`{Boolean}`|Disables the plugin|
|**`ignoreOrder`**|`{Boolean}`|Disables order check (useful for CSS Modules!), `false` by default|
* `[name]` name of the chunk
* `[id]` number of the chunk
* `[contenthash]` hash of the content of the extracted file
> :warning: `ExtractTextPlugin` generates a file **per entry**, so you must use `[name]`, `[id]` or `[contenthash]` when using multiple entries.
#### `#extract`
```js
ExtractTextPlugin.extract(options: loader | object)
```
Creates an extracting loader from an existing loader. Supports loaders of type `{ loader: [name]-loader -> {String}, options: {} -> {Object} }`.
|Name|Type|Description|
|:--:|:--:|:----------|
|**`options.use`**|`{String}`/`{Array}`/`{Object}`|Loader(s) that should be used for converting the resource to a CSS exporting module _(required)_|
|**`options.fallback`**|`{String}`/`{Array}`/`{Object}`|loader(e.g `'style-loader'`) that should be used when the CSS is not extracted (i.e. in an additional chunk when `allChunks: false`)|
|**`options.publicPath`**|`{String}`|Override the `publicPath` setting for this loader|
#### Multiple Instances
There is also an `extract` function on the instance. You should use this if you have more than one instance of `ExtractTextPlugin`.
```js
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// Create multiple instances
const extractCSS = new ExtractTextPlugin('stylesheets/[name]-one.css');
const extractLESS = new ExtractTextPlugin('stylesheets/[name]-two.css');
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: extractCSS.extract([ 'css-loader', 'postcss-loader' ])
},
{
test: /\.less$/i,
use: extractLESS.extract([ 'css-loader', 'less-loader' ])
},
]
},
plugins: [
extractCSS,
extractLESS
]
};
```
### Extracting Sass or LESS
The configuration is the same, switch out `sass-loader` for `less-loader` when necessary.
```js
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
module: {
rules: [
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
//resolve-url-loader may be chained before sass-loader if necessary
use: ['css-loader', 'sass-loader']
})
}
]
},
plugins: [
new ExtractTextPlugin('style.css')
//if you want to pass in options, you can do so:
//new ExtractTextPlugin({
// filename: 'style.css'
//})
]
}
```
### Modify filename
`filename` parameter could be `Function`. It passes `getPath` to process the format like `css/[name].css` and returns the real file name, `css/js/a.css`. You can replace `css/js` with `css` then you will get the new path `css/a.css`.
```js
entry: {
'js/a': "./a"
},
plugins: [
new ExtractTextPlugin({
filename: (getPath) => {
return getPath('css/[name].css').replace('css/js', 'css');
},
allChunks: true
})
]
```
<h2 align="center">Maintainers</h2>
<table>
<tbody>
<tr>
<td align="center">
<img width="150" height="150"
src="https://avatars3.githubusercontent.com/u/166921?v=3&s=150">
</br>
<a href="https://github.com/bebraw">Juho Vepsäläinen</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars2.githubusercontent.com/u/8420490?v=3&s=150">
</br>
<a href="https://github.com/d3viant0ne">Joshua Wiens</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars3.githubusercontent.com/u/533616?v=3&s=150">
</br>
<a href="https://github.com/SpaceK33z">Kees Kluskens</a>
</td>
<td align="center">
<img width="150" height="150"
src="https://avatars3.githubusercontent.com/u/3408176?v=3&s=150">
</br>
<a href="https://github.com/TheLarkInn">Sean Larkin</a>
</td>
</tr>
<tbody>
</table>
[npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg
[npm-url]: https://npmjs.com/package/extract-text-webpack-plugin
[node]: https://img.shields.io/node/v/extract-text-webpack-plugin.svg
[node-url]: https://nodejs.org
[deps]: https://david-dm.org/webpack-contrib/extract-text-webpack-plugin.svg
[deps-url]: https://david-dm.org/webpack-contrib/extract-text-webpack-plugin
[tests]: http://img.shields.io/travis/webpack-contrib/extract-text-webpack-plugin.svg
[tests-url]: https://travis-ci.org/webpack-contrib/extract-text-webpack-plugin
[cover]: https://coveralls.io/repos/github/webpack-contrib/extract-text-webpack-plugin/badge.svg
[cover-url]: https://coveralls.io/github/webpack-contrib/extract-text-webpack-plugin
[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack

View File

@@ -0,0 +1,61 @@
# Webpack merge, tag and release process
Webpack standard Automatic versioning and CHANGELOG management, using GitHub's new squash button and
the [recommended workflow](https://github.com/conventional-changelog/conventional-changelog-cli#recommended-workflow) for `conventional-changelog`.
## Pull requests into `master`
1. When you land commits on your `master` branch, select the _Squash and Merge_ option.
2. Add a title and body that follows the [conventional-changelog-standard conventions](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md).
3. Land It!
## Cut a standard release
```sh
# npm run script
npm run release
# or global bin
standard-version
```
_This will increment the package version based on commit history from the last tag, update the changelog accordingly, commits the changes & cuts a **local tag**_
### When satisfied with the local tag, push it up to master.
```sh
# commandline
git push --follow-tags origin master
```
## Cut a pre-release
Use the flag `--prerelease` to generate pre-releases:
_Example: Given the last version of the package is `1.0.0`, and your code to be committed has `semver: patch` level changes..._
```bash
# npm run script ( name === alpha, beta, rc )
npm run release -- --prerelease <name>
```
_this will tag the version `1.0.1-alpha.0`_
## Cut a target release version imperatively like `npm version`
To forgo the automated version bump use `--release-as` with the argument `major`, `minor` or `patch`:
Suppose the last version of your code is `1.0.0`, you've only landed `fix:` commits, but
you would like your next release to be a `minor`. Simply do:
```bash
# npm run script
npm run release -- --release-as minor
```
_you will get version `1.1.0` rather than the auto generated version `1.0.1`._
> **NOTE:** you can combine `--release-as` and `--prerelease` to generate a release. This is useful when publishing experimental feature(s).
## Signing commits and tags
If you have your GPG key set up, add the `--sign` or `-s` flag to your `standard-version` command.

344
web/node_modules/extract-text-webpack-plugin/index.js generated vendored Normal file
View File

@@ -0,0 +1,344 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var fs = require('fs');
var ConcatSource = require("webpack-sources").ConcatSource;
var async = require("async");
var ExtractedModule = require("./ExtractedModule");
var Chunk = require("webpack/lib/Chunk");
var OrderUndefinedError = require("./OrderUndefinedError");
var loaderUtils = require("loader-utils");
var schemaTester = require('./schema/validator');
var loaderSchema = require('./schema/loader-schema');
var pluginSchema = require('./schema/plugin-schema.json');
var NS = fs.realpathSync(__dirname);
var nextId = 0;
function ExtractTextPluginCompilation() {
this.modulesByIdentifier = {};
}
ExtractTextPlugin.prototype.mergeNonInitialChunks = function(chunk, intoChunk, checkedChunks) {
if(!intoChunk) {
checkedChunks = [];
chunk.chunks.forEach(function(c) {
if(c.isInitial()) return;
this.mergeNonInitialChunks(c, chunk, checkedChunks);
}, this);
} else if(checkedChunks.indexOf(chunk) < 0) {
checkedChunks.push(chunk);
chunk.modules.slice().forEach(function(module) {
intoChunk.addModule(module);
module.addChunk(intoChunk);
});
chunk.chunks.forEach(function(c) {
if(c.isInitial()) return;
this.mergeNonInitialChunks(c, intoChunk, checkedChunks);
}, this);
}
};
ExtractTextPluginCompilation.prototype.addModule = function(identifier, originalModule, source, additionalInformation, sourceMap, prevModules) {
var m;
if(!this.modulesByIdentifier[identifier]) {
m = this.modulesByIdentifier[identifier] = new ExtractedModule(identifier, originalModule, source, sourceMap, additionalInformation, prevModules);
} else {
m = this.modulesByIdentifier[identifier];
m.addPrevModules(prevModules);
if(originalModule.index2 < m.getOriginalModule().index2) {
m.setOriginalModule(originalModule);
}
}
return m;
};
ExtractTextPluginCompilation.prototype.addResultToChunk = function(identifier, result, originalModule, extractedChunk) {
if(!Array.isArray(result)) {
result = [[identifier, result]];
}
var counterMap = {};
var prevModules = [];
result.forEach(function(item) {
var c = counterMap[item[0]];
var module = this.addModule.call(this, item[0] + (c || ""), originalModule, item[1], item[2], item[3], prevModules.slice());
extractedChunk.addModule(module);
module.addChunk(extractedChunk);
counterMap[item[0]] = (c || 0) + 1;
prevModules.push(module);
}, this);
};
ExtractTextPlugin.prototype.renderExtractedChunk = function(chunk) {
var source = new ConcatSource();
chunk.modules.forEach(function(module) {
var moduleSource = module.source();
source.add(this.applyAdditionalInformation(moduleSource, module.additionalInformation));
}, this);
return source;
};
function isInvalidOrder(a, b) {
var bBeforeA = a.getPrevModules().indexOf(b) >= 0;
var aBeforeB = b.getPrevModules().indexOf(a) >= 0;
return aBeforeB && bBeforeA;
}
function getOrder(a, b) {
var aOrder = a.getOrder();
var bOrder = b.getOrder();
if(aOrder < bOrder) return -1;
if(aOrder > bOrder) return 1;
var aIndex = a.getOriginalModule().index2;
var bIndex = b.getOriginalModule().index2;
if(aIndex < bIndex) return -1;
if(aIndex > bIndex) return 1;
var bBeforeA = a.getPrevModules().indexOf(b) >= 0;
var aBeforeB = b.getPrevModules().indexOf(a) >= 0;
if(aBeforeB && !bBeforeA) return -1;
if(!aBeforeB && bBeforeA) return 1;
var ai = a.identifier();
var bi = b.identifier();
if(ai < bi) return -1;
if(ai > bi) return 1;
return 0;
}
function ExtractTextPlugin(options) {
if(arguments.length > 1) {
throw new Error("Breaking change: ExtractTextPlugin now only takes a single argument. Either an options " +
"object *or* the name of the result file.\n" +
"Example: if your old code looked like this:\n" +
" new ExtractTextPlugin('css/[name].css', { disable: false, allChunks: true })\n\n" +
"You would change it to:\n" +
" new ExtractTextPlugin({ filename: 'css/[name].css', disable: false, allChunks: true })\n\n" +
"The available options are:\n" +
" filename: string\n" +
" allChunks: boolean\n" +
" disable: boolean\n");
}
if(isString(options)) {
options = { filename: options };
} else {
schemaTester(pluginSchema, options);
}
this.filename = options.filename;
this.id = options.id != null ? options.id : ++nextId;
this.options = {};
mergeOptions(this.options, options);
delete this.options.filename;
delete this.options.id;
}
module.exports = ExtractTextPlugin;
function getLoaderObject(loader) {
if (isString(loader)) {
return {loader: loader};
}
return loader;
}
function mergeOptions(a, b) {
if(!b) return a;
Object.keys(b).forEach(function(key) {
a[key] = b[key];
});
return a;
}
function isString(a) {
return typeof a === "string";
}
function isFunction(a) {
return isType('Function', a);
}
function isType(type, obj) {
return Object.prototype.toString.call(obj) === '[object ' + type + ']';
}
ExtractTextPlugin.loader = function(options) {
return { loader: require.resolve("./loader"), options: options };
};
ExtractTextPlugin.prototype.applyAdditionalInformation = function(source, info) {
if(info) {
return new ConcatSource(
"@media " + info[0] + " {",
source,
"}"
);
}
return source;
};
ExtractTextPlugin.prototype.loader = function(options) {
return ExtractTextPlugin.loader(mergeOptions({id: this.id}, options));
};
ExtractTextPlugin.prototype.extract = function(options) {
if(arguments.length > 1) {
throw new Error("Breaking change: extract now only takes a single argument. Either an options " +
"object *or* the loader(s).\n" +
"Example: if your old code looked like this:\n" +
" ExtractTextPlugin.extract('style-loader', 'css-loader')\n\n" +
"You would change it to:\n" +
" ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })\n\n" +
"The available options are:\n" +
" use: string | object | loader[]\n" +
" fallback: string | object | loader[]\n" +
" publicPath: string\n");
}
if(options.fallbackLoader) {
console.warn('fallbackLoader option has been deprecated - replace with "fallback"');
}
if(options.loader) {
console.warn('loader option has been deprecated - replace with "use"');
}
if(Array.isArray(options) || isString(options) || typeof options.options === "object" || typeof options.query === 'object') {
options = { loader: options };
} else {
schemaTester(loaderSchema, options);
}
var loader = options.use ||  options.loader;
var before = options.fallback || options.fallbackLoader || [];
if(isString(loader)) {
loader = loader.split("!");
}
if(isString(before)) {
before = before.split("!");
} else if(!Array.isArray(before)) {
before = [before];
}
options = mergeOptions({omit: before.length, remove: true}, options);
delete options.loader;
delete options.use;
delete options.fallback;
delete options.fallbackLoader;
return [this.loader(options)]
.concat(before, loader)
.map(getLoaderObject);
}
ExtractTextPlugin.extract = ExtractTextPlugin.prototype.extract.bind(ExtractTextPlugin);
ExtractTextPlugin.prototype.apply = function(compiler) {
var options = this.options;
compiler.plugin("this-compilation", function(compilation) {
var extractCompilation = new ExtractTextPluginCompilation();
compilation.plugin("normal-module-loader", function(loaderContext, module) {
loaderContext[NS] = function(content, opt) {
if(options.disable)
return false;
if(!Array.isArray(content) && content != null)
throw new Error("Exported value was not extracted as an array: " + JSON.stringify(content));
module[NS] = {
content: content,
options: opt || {}
};
return options.allChunks || module[NS + "/extract"]; // eslint-disable-line no-path-concat
};
});
var filename = this.filename;
var id = this.id;
var extractedChunks, entryChunks, initialChunks;
compilation.plugin("optimize-tree", function(chunks, modules, callback) {
extractedChunks = chunks.map(function() {
return new Chunk();
});
chunks.forEach(function(chunk, i) {
var extractedChunk = extractedChunks[i];
extractedChunk.index = i;
extractedChunk.originalChunk = chunk;
extractedChunk.name = chunk.name;
extractedChunk.entrypoints = chunk.entrypoints;
chunk.chunks.forEach(function(c) {
extractedChunk.addChunk(extractedChunks[chunks.indexOf(c)]);
});
chunk.parents.forEach(function(c) {
extractedChunk.addParent(extractedChunks[chunks.indexOf(c)]);
});
});
async.forEach(chunks, function(chunk, callback) {
var extractedChunk = extractedChunks[chunks.indexOf(chunk)];
var shouldExtract = !!(options.allChunks || chunk.isInitial());
async.forEach(chunk.modules.slice(), function(module, callback) {
var meta = module[NS];
if(meta && (!meta.options.id || meta.options.id === id)) {
var wasExtracted = Array.isArray(meta.content);
if(shouldExtract !== wasExtracted) {
module[NS + "/extract"] = shouldExtract; // eslint-disable-line no-path-concat
compilation.rebuildModule(module, function(err) {
if(err) {
compilation.errors.push(err);
return callback();
}
meta = module[NS];
if(!Array.isArray(meta.content)) {
err = new Error(module.identifier() + " doesn't export content");
compilation.errors.push(err);
return callback();
}
if(meta.content)
extractCompilation.addResultToChunk(module.identifier(), meta.content, module, extractedChunk);
callback();
});
} else {
if(meta.content)
extractCompilation.addResultToChunk(module.identifier(), meta.content, module, extractedChunk);
callback();
}
} else callback();
}, function(err) {
if(err) return callback(err);
callback();
});
}, function(err) {
if(err) return callback(err);
extractedChunks.forEach(function(extractedChunk) {
if(extractedChunk.isInitial())
this.mergeNonInitialChunks(extractedChunk);
}, this);
extractedChunks.forEach(function(extractedChunk) {
if(!extractedChunk.isInitial()) {
extractedChunk.modules.slice().forEach(function(module) {
extractedChunk.removeModule(module);
});
}
});
compilation.applyPlugins("optimize-extracted-chunks", extractedChunks);
callback();
}.bind(this));
}.bind(this));
compilation.plugin("additional-assets", function(callback) {
extractedChunks.forEach(function(extractedChunk) {
if(extractedChunk.modules.length) {
extractedChunk.modules.sort(function(a, b) {
if(!options.ignoreOrder && isInvalidOrder(a, b)) {
compilation.errors.push(new OrderUndefinedError(a.getOriginalModule()));
compilation.errors.push(new OrderUndefinedError(b.getOriginalModule()));
}
return getOrder(a, b);
});
var chunk = extractedChunk.originalChunk;
var source = this.renderExtractedChunk(extractedChunk);
var getPath = (format) => compilation.getPath(format, {
chunk: chunk
}).replace(/\[(?:(\w+):)?contenthash(?::([a-z]+\d*))?(?::(\d+))?\]/ig, function() {
return loaderUtils.getHashDigest(source.source(), arguments[1], arguments[2], parseInt(arguments[3], 10));
});
var file = (isFunction(filename)) ? filename(getPath) : getPath(filename);
compilation.assets[file] = source;
chunk.files.push(file);
}
}, this);
callback();
}.bind(this));
}.bind(this));
};

135
web/node_modules/extract-text-webpack-plugin/loader.js generated vendored Normal file
View File

@@ -0,0 +1,135 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var fs = require("fs");
var loaderUtils = require("loader-utils");
var NodeTemplatePlugin = require("webpack/lib/node/NodeTemplatePlugin");
var NodeTargetPlugin = require("webpack/lib/node/NodeTargetPlugin");
var LibraryTemplatePlugin = require("webpack/lib/LibraryTemplatePlugin");
var SingleEntryPlugin = require("webpack/lib/SingleEntryPlugin");
var LimitChunkCountPlugin = require("webpack/lib/optimize/LimitChunkCountPlugin");
var NS = fs.realpathSync(__dirname);
module.exports = function(source) {
if(this.cacheable) this.cacheable();
return source;
};
module.exports.pitch = function(request) {
if(this.cacheable) this.cacheable();
var query = loaderUtils.getOptions(this) || {};
var loaders = this.loaders.slice(this.loaderIndex + 1);
this.addDependency(this.resourcePath);
// We already in child compiler, return empty bundle
if(this[NS] === undefined) {
throw new Error(
'"extract-text-webpack-plugin" loader is used without the corresponding plugin, ' +
'refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example'
);
} else if(this[NS] === false) {
return "";
} else if(this[NS](null, query)) {
if(query.omit) {
this.loaderIndex += +query.omit + 1;
request = request.split("!").slice(+query.omit).join("!");
loaders = loaders.slice(+query.omit);
}
var resultSource;
if(query.remove) {
resultSource = "// removed by extract-text-webpack-plugin";
} else {
resultSource = undefined;
}
var childFilename = "extract-text-webpack-plugin-output-filename"; // eslint-disable-line no-path-concat
var publicPath = typeof query.publicPath === "string" ? query.publicPath : this._compilation.outputOptions.publicPath;
var outputOptions = {
filename: childFilename,
publicPath: publicPath
};
var childCompiler = this._compilation.createChildCompiler("extract-text-webpack-plugin", outputOptions);
childCompiler.apply(new NodeTemplatePlugin(outputOptions));
childCompiler.apply(new LibraryTemplatePlugin(null, "commonjs2"));
childCompiler.apply(new NodeTargetPlugin());
childCompiler.apply(new SingleEntryPlugin(this.context, "!!" + request));
childCompiler.apply(new LimitChunkCountPlugin({ maxChunks: 1 }));
var subCache = "subcache " + NS + " " + request; // eslint-disable-line no-path-concat
childCompiler.plugin("compilation", function(compilation) {
if(compilation.cache) {
if(!compilation.cache[subCache])
compilation.cache[subCache] = {};
compilation.cache = compilation.cache[subCache];
}
});
// We set loaderContext[NS] = false to indicate we already in
// a child compiler so we don't spawn another child compilers from there.
childCompiler.plugin("this-compilation", function(compilation) {
compilation.plugin("normal-module-loader", function(loaderContext, module) {
loaderContext[NS] = false;
if (module.request === request) {
module.loaders = loaders.map(function(loader) {
return {
loader: loader.path,
options: loader.options
};
});
}
});
});
var source;
childCompiler.plugin("after-compile", function(compilation, callback) {
source = compilation.assets[childFilename] && compilation.assets[childFilename].source();
// Remove all chunk assets
compilation.chunks.forEach(function(chunk) {
chunk.files.forEach(function(file) {
delete compilation.assets[file];
});
});
callback();
});
var callback = this.async();
childCompiler.runAsChild(function(err, entries, compilation) {
if(err) return callback(err);
if(compilation.errors.length > 0) {
return callback(compilation.errors[0]);
}
compilation.fileDependencies.forEach(function(dep) {
this.addDependency(dep);
}, this);
compilation.contextDependencies.forEach(function(dep) {
this.addContextDependency(dep);
}, this);
if(!source) {
return callback(new Error("Didn't get a result from child compiler"));
}
try {
var text = this.exec(source, request);
if(typeof text === "string")
text = [[0, text]];
text.forEach(function(item) {
var id = item[0];
compilation.modules.forEach(function(module) {
if(module.id === id)
item[0] = module.identifier();
});
});
this[NS](text, query);
if(text.locals && typeof resultSource !== "undefined") {
resultSource += "\nmodule.exports = " + JSON.stringify(text.locals) + ";";
}
} catch(e) {
return callback(e);
}
if(resultSource)
callback(null, resultSource);
else
callback();
}.bind(this));
}
};

View File

@@ -0,0 +1,4 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"><path d="M4163.6,4997.5c-97.6-47.9-95.7-78.5,70.8-744.8c84.2-340.8,162.7-643.3,174.2-670.1c34.5-86.2,80.4-93.8,591.6-93.8c511.2,0,557.2,7.7,591.6,93.8c11.5,26.8,90,329.3,174.2,670.1c168.5,672,170.4,696.9,65.1,746.7C5768.1,5028.1,4224.8,5026.2,4163.6,4997.5z M5563.2,4681.6c-9.6-47.9-178-725.7-201-813.7l-19.1-72.8h-342.7h-342.7l-19.1,72.8c-11.5,38.3-59.4,229.8-107.2,425.1c-47.9,195.3-91.9,369.5-97.6,388.7c-9.6,30.6,26.8,32.5,562.9,32.5C5534.5,4714.1,5570.8,4712.2,5563.2,4681.6z"/><path d="M3926.2,4070.8c-206.8-63.2-369.5-229.8-430.8-444.2c-93.8-319.8,153.2-675.9,515-741l70.8-13.4v-243.1v-243.2l-224-72.8C2756.3,1957,1879.4,1101.2,1517.5,30.9c-302.5-898-239.3-1853.4,180-2720.7c499.7-1026.2,1418.7-1751.9,2544.6-2006.6c1589.2-358,3277.9,459.5,4034.2,1954.8c442.3,873.1,515,1859.1,206.8,2772.4c-360,1064.5-1212,1901.2-2311,2270.8l-252.7,86.2V2631v241.2l82.3,13.4c185.7,32.6,371.4,172.3,467.2,358.1c74.7,145.5,74.7,344.6,0,490.1c-95.7,185.7-281.5,325.5-467.2,358l-82.3,13.4v-153.2v-151.3l74.7-13.4c155.1-24.9,245.1-158.9,227.8-340.8c-11.5-111-59.3-183.8-151.2-229.8c-59.4-30.6-151.3-34.5-1070.3-34.5c-919,0-1010.9,3.8-1070.3,34.5c-91.9,46-139.8,118.7-151.3,229.8c-17.2,181.9,72.8,315.9,227.8,340.8l74.7,13.4v149.3C4081.2,4120.6,4083.2,4120.6,3926.2,4070.8z M5613,2560.1c0-319.8,13.4-398.2,74.7-421.2c17.2-7.7,134-42.1,260.4-78.5C7108.3,1725.4,7981.4,852.3,8264.7-260.1c143.6-562.9,135.9-1233-23-1784.5C8079-2611.3,7809.1-3067,7385.9-3492c-509.3-507.4-1083.7-808-1801.7-938.2c-270-49.8-898-49.8-1167.9,0c-1010.9,185.7-1861,781.2-2353.1,1654.2c-271.9,478.7-407.8,980.3-427,1564.3C1586.5,329.6,2540,1622,4052.5,2060.4c126.4,36.4,243.2,70.8,260.4,78.5c61.3,23,74.7,101.5,74.7,421.2v315.9h612.7H5613V2560.1z"/><path d="M3049.3,846.5c-120.6-55.5-302.5-189.6-404-298.7c-248.9-266.1-411.7-612.7-501.6-1064.5c-55.5-289.1-59.3-813.7-7.7-1087.5c76.6-392.5,233.6-779.3,455.7-1110.5c141.7-212.5,459.5-549.5,660.6-700.8c578.2-436.6,1303.9-651,1983.6-585.9c712.2,67,1334.5,365.7,1832.3,878.8c287.2,294.9,467.2,562.9,614.6,915.2c212.5,511.2,273.8,1079.9,178.1,1656.2C7759.3,50,7464.4,544,7064.3,785.3c-160.8,95.7-210.6,111.1-279.5,82.3c-61.3-26.8-90-78.5-107.2-203c-5.8-42.1-26.8-97.6-46-124.4c-111.1-151.3-394.4-151.3-505.5,1.9c-21.1,26.8-44,99.6-51.7,160.8c-17.2,126.4-65.1,181.9-155.1,181.9s-137.9-55.5-155.1-181.9c-7.7-61.3-30.6-134-51.7-160.8c-111-153.2-394.4-153.2-505.5,0c-21.1,26.8-44,99.6-51.7,160.8c-17.2,126.4-65.1,181.9-155.1,181.9c-90,0-137.9-55.5-155.1-181.9c-7.7-61.3-30.6-134-51.7-160.8c-111.1-153.2-394.4-153.2-505.5,0c-21,26.8-44,99.6-51.7,160.8c-17.2,126.4-65.1,181.9-155.1,181.9s-137.9-55.5-155.1-181.9c-7.7-61.3-30.6-134-51.7-160.8c-111.1-153.2-394.4-153.2-505.5-1.9c-19.2,26.8-40.2,82.3-46,124.4c-17.2,118.7-44,174.2-95.7,199.1C3164.1,892.5,3146.9,890.6,3049.3,846.5z M3127.8,398.5c116.8-174.2,363.8-296.8,545.7-271.9c109.1,15.3,237.4,70.8,333.1,147.4l74.7,59.4l74.7-59.4c245.1-193.4,524.6-193.4,769.7,0l74.7,59.4L5073,276c141.7-111,231.7-145.5,386.8-145.5c155.1,0,245.1,34.5,388.7,145.5l70.8,57.5l74.7-59.4c229.8-181.9,478.7-195.3,716.1-38.3c78.5,51.7,116.8,93.8,216.4,241.3c19.2,26.8,32.5,23,111.1-44c112.9-93.8,277.6-306.3,352.3-457.6c70.8-141.7,143.6-375.3,178.1-564.8c40.2-220.2,34.5-829-9.6-1033.9c-113-526.5-350.4-970.7-710.3-1330.7s-804.2-597.4-1330.7-710.3c-124.5-26.8-245.1-36.4-516.9-36.4c-271.9,0-392.5,9.6-517,36.4c-808,174.2-1436,645.2-1795.9,1347.9c-126.4,243.2-206.8,488.2-256.6,779.3c-32.5,195.3-38.3,277.6-26.8,545.7c17.2,517,113,859.7,323.6,1167.9c68.9,99.6,298.7,329.3,319.8,321.7C3056.9,494.2,3091.4,450.2,3127.8,398.5z"/><path d="M3706-669.9c-78.5-36.4-84.2-84.2-84.2-742.9c0-666.3,3.8-706.5,90-744.8c65.1-30.6,2512-30.6,2577.1,0c86.2,38.3,90,78.5,90,744.8c0,666.3-3.8,706.5-90,744.8C6227.6-639.2,3765.3-641.2,3706-669.9z M6072.5-1412.8v-459.5H5000.3H3928.1v459.5v459.5h1072.2h1072.2V-1412.8z"/><path d="M4234.4-1412.8v-153.2h153.2h153.2v153.2v153.2h-153.2h-153.2V-1412.8z"/><path d="M4847.1-1412.8v-153.2h153.2h153.2v153.2v153.2h-153.2h-153.2V-1412.8z"/><path d="M5459.8-1412.8v-153.2H5613h153.2v153.2v153.2H5613h-153.2V-1412.8z"/></g></g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,75 @@
{
"_from": "extract-text-webpack-plugin@2.1.0",
"_id": "extract-text-webpack-plugin@2.1.0",
"_inBundle": false,
"_integrity": "sha1-aTFbiF+Hbb+W04Gfap8cynrr8Vk=",
"_location": "/extract-text-webpack-plugin",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "extract-text-webpack-plugin@2.1.0",
"name": "extract-text-webpack-plugin",
"escapedName": "extract-text-webpack-plugin",
"rawSpec": "2.1.0",
"saveSpec": null,
"fetchSpec": "2.1.0"
},
"_requiredBy": [
"/react-scripts"
],
"_resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.0.tgz",
"_shasum": "69315b885f876dbf96d3819f6a9f1cca7aebf159",
"_spec": "extract-text-webpack-plugin@2.1.0",
"_where": "/home/bilal/Saburly/slucajna-televizija/node_modules/react-scripts",
"author": {
"name": "Tobias Koppers @sokra"
},
"bugs": {
"url": "https://github.com/webpack/extract-text-webpack-plugin/issues"
},
"bundleDependencies": false,
"dependencies": {
"ajv": "^4.11.2",
"async": "^2.1.2",
"loader-utils": "^1.0.2",
"webpack-sources": "^0.1.0"
},
"deprecated": false,
"description": "Extract text from bundle into a file.",
"devDependencies": {
"codecov.io": "^0.1.2",
"coveralls": "^2.11.2",
"css-loader": "^0.26.1",
"file-loader": "^0.9.0",
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"mocha-lcov-reporter": "1.2.0",
"raw-loader": "^0.5.1",
"should": "^11.1.2",
"standard-version": "^4.0.0",
"style-loader": "^0.13.0",
"webpack": "^2.2.0"
},
"engines": {
"node": ">=4.3.0 < 5.0.0 || >= 5.10"
},
"homepage": "http://github.com/webpack/extract-text-webpack-plugin",
"license": "MIT",
"name": "extract-text-webpack-plugin",
"peerDependencies": {
"webpack": "^2.2.0"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/webpack/extract-text-webpack-plugin.git"
},
"scripts": {
"build:example": "(cd example && webpack)",
"cover": "istanbul cover _mocha",
"release": "standard-version",
"test": "mocha",
"travis": "npm run cover -- --report lcovonly"
},
"version": "2.1.0"
}

View File

@@ -0,0 +1,19 @@
module.exports = {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"allChunks": { "type": "boolean"},
"disable": { "type": "boolean" },
"omit": { "type": "boolean" },
"remove": { "type": "boolean" },
"fallback": { "type": ["string", "array", "object"] },
"filename": { "type": "string" },
"use": { "type": ["string", "array", "object"] },
"publicPath": { "type": "string" },
// deprecated
"fallbackLoader": { "type": ["string", "array", "object"] },
"loader": { "type": ["string", "array", "object"] }
}
};

View File

@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"allChunks": {
"description": "",
"type": "boolean"
},
"disable": {
"description": "",
"type": "boolean"
},
"fallback": {
"description": "A loader that webpack can fall back to if the original one fails.",
"modes": {
"type": "string",
"type": "object",
"type": "array"
}
},
"filename": {
"description": "The filename and path that ExtractTextPlugin will extract to",
"modes": {
"type": "string",
"type": "function"
}
},
"ignoreOrder": {
"description": "Ignore dependency order (useful for CSS Modules)",
"type": "boolean"
},
"loader": {
"description": "The loader that ExtractTextPlugin will attempt to load through.",
"modes": {
"type": "string",
"type": "object",
"type": "array"
}
},
"publicPath": {
"description": "",
"type": "string"
}
}
}

View File

@@ -0,0 +1,13 @@
var Ajv = require('ajv');
var ajv = new Ajv({allErrors: true});
module.exports = function validate(schema, data) {
var ajv = new Ajv({
errorDataPath: 'property'
});
var isValid = ajv.validate(schema, data);
if(!isValid) {
throw new Error(ajv.errorsText());
}
}

3343
web/node_modules/extract-text-webpack-plugin/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff