diff options
author | 2020-11-18 23:26:45 +0100 | |
---|---|---|
committer | 2020-11-18 23:26:45 +0100 | |
commit | 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch) | |
tree | 8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/webpack-sources/lib/ConcatSource.js | |
parent | 1870f3fdf43707a15fda0f609a021f516f45eb63 (diff) | |
download | website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2 website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip |
rm node_modules
Diffstat (limited to 'node_modules/webpack-sources/lib/ConcatSource.js')
-rw-r--r-- | node_modules/webpack-sources/lib/ConcatSource.js | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/node_modules/webpack-sources/lib/ConcatSource.js b/node_modules/webpack-sources/lib/ConcatSource.js deleted file mode 100644 index 25167d6..0000000 --- a/node_modules/webpack-sources/lib/ConcatSource.js +++ /dev/null @@ -1,91 +0,0 @@ -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -"use strict"; - -const SourceNode = require("source-map").SourceNode; -const SourceListMap = require("source-list-map").SourceListMap; -const Source = require("./Source"); - -class ConcatSource extends Source { - constructor() { - super(); - this.children = []; - for(var i = 0; i < arguments.length; i++) { - var item = arguments[i]; - if(item instanceof ConcatSource) { - var children = item.children; - for(var j = 0; j < children.length; j++) - this.children.push(children[j]); - } else { - this.children.push(item); - } - } - } - - add(item) { - if(item instanceof ConcatSource) { - var children = item.children; - for(var j = 0; j < children.length; j++) - this.children.push(children[j]); - } else { - this.children.push(item); - } - } - - source() { - let source = ""; - const children = this.children; - for(let i = 0; i < children.length; i++) { - const child = children[i]; - source += typeof child === "string" ? child : child.source(); - } - return source; - } - - size() { - let size = 0; - const children = this.children; - for(let i = 0; i < children.length; i++) { - const child = children[i]; - size += typeof child === "string" ? child.length : child.size(); - } - return size; - } - - node(options) { - const node = new SourceNode(null, null, null, this.children.map(function(item) { - return typeof item === "string" ? item : item.node(options); - })); - return node; - } - - listMap(options) { - const map = new SourceListMap(); - var children = this.children; - for(var i = 0; i < children.length; i++) { - var item = children[i]; - if(typeof item === "string") - map.add(item); - else - map.add(item.listMap(options)); - } - return map; - } - - updateHash(hash) { - var children = this.children; - for(var i = 0; i < children.length; i++) { - var item = children[i]; - if(typeof item === "string") - hash.update(item); - else - item.updateHash(hash); - } - } -} - -require("./SourceAndMapMixin")(ConcatSource.prototype); - -module.exports = ConcatSource; |