summaryrefslogtreecommitdiffstats
path: root/node_modules/file-loader/dist
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-16 00:10:28 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-16 00:10:28 +0100
commite06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (patch)
tree55713f725f77b44ebfec86e4eec3ce33e71458ca /node_modules/file-loader/dist
downloadwebsite_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.gz
website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.bz2
website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.zip
api, login, auth
Diffstat (limited to 'node_modules/file-loader/dist')
-rw-r--r--node_modules/file-loader/dist/cjs.js6
-rw-r--r--node_modules/file-loader/dist/index.js61
-rw-r--r--node_modules/file-loader/dist/options.json60
3 files changed, 127 insertions, 0 deletions
diff --git a/node_modules/file-loader/dist/cjs.js b/node_modules/file-loader/dist/cjs.js
new file mode 100644
index 0000000..22e752d
--- /dev/null
+++ b/node_modules/file-loader/dist/cjs.js
@@ -0,0 +1,6 @@
+"use strict";
+
+const loader = require('./index');
+
+module.exports = loader.default;
+module.exports.raw = loader.raw; \ No newline at end of file
diff --git a/node_modules/file-loader/dist/index.js b/node_modules/file-loader/dist/index.js
new file mode 100644
index 0000000..45ecee5
--- /dev/null
+++ b/node_modules/file-loader/dist/index.js
@@ -0,0 +1,61 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loader;
+exports.raw = void 0;
+
+var _path = _interopRequireDefault(require("path"));
+
+var _loaderUtils = _interopRequireDefault(require("loader-utils"));
+
+var _schemaUtils = _interopRequireDefault(require("schema-utils"));
+
+var _options = _interopRequireDefault(require("./options.json"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function loader(content) {
+ const options = _loaderUtils.default.getOptions(this) || {};
+ (0, _schemaUtils.default)(_options.default, options, 'File Loader');
+ const context = options.context || this.rootContext;
+
+ const url = _loaderUtils.default.interpolateName(this, options.name, {
+ context,
+ content,
+ regExp: options.regExp
+ });
+
+ let outputPath = url;
+
+ if (options.outputPath) {
+ if (typeof options.outputPath === 'function') {
+ outputPath = options.outputPath(url, this.resourcePath, context);
+ } else {
+ outputPath = _path.default.posix.join(options.outputPath, url);
+ }
+ }
+
+ let publicPath = `__webpack_public_path__ + ${JSON.stringify(outputPath)}`;
+
+ if (options.publicPath) {
+ if (typeof options.publicPath === 'function') {
+ publicPath = options.publicPath(url, this.resourcePath, context);
+ } else {
+ publicPath = `${options.publicPath.endsWith('/') ? options.publicPath : `${options.publicPath}/`}${url}`;
+ }
+
+ publicPath = JSON.stringify(publicPath);
+ }
+
+ if (typeof options.emitFile === 'undefined' || options.emitFile) {
+ this.emitFile(outputPath, content);
+ } // TODO revert to ES2015 Module export, when new CSS Pipeline is in place
+
+
+ return `module.exports = ${publicPath};`;
+}
+
+const raw = true;
+exports.raw = raw; \ No newline at end of file
diff --git a/node_modules/file-loader/dist/options.json b/node_modules/file-loader/dist/options.json
new file mode 100644
index 0000000..546e22b
--- /dev/null
+++ b/node_modules/file-loader/dist/options.json
@@ -0,0 +1,60 @@
+{
+ "additionalProperties": true,
+ "properties": {
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "instanceof": "Function"
+ }
+ ]
+ },
+ "outputPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "instanceof": "Function"
+ }
+ ]
+ },
+ "publicPath": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "instanceof": "Function"
+ }
+ ]
+ },
+ "context": {
+ "type": "string"
+ },
+ "emitFile": {
+ "type": "boolean"
+ },
+ "regExp": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "instanceof": "RegExp"
+ }
+ ]
+ }
+ },
+ "errorMessages": {
+ "name": "should be {String} or {Function} (https://github.com/webpack-contrib/file-loader#name)",
+ "outputPath": "should be {String} or {Function} (https://github.com/webpack-contrib/file-loader#outputpath)",
+ "publicPath": "should be {String} or {Function} (https://github.com/webpack-contrib/file-loader#publicpath)",
+ "context": "should be {String} (https://github.com/webpack-contrib/file-loader#context)",
+ "emitFile": "should be {Boolean} (https://github.com/webpack-contrib/file-loader#emitfile)",
+ "regExp": "should be {String} or {RegExp} (https://github.com/webpack-contrib/file-loader#regexp)"
+ },
+ "type": "object"
+}