{"name":"loader-runner","version":"4.3.2","description":"Runs (webpack) loaders","keywords":["webpack","loader"],"homepage":"https://github.com/webpack/loader-runner#readme","bugs":{"url":"https://github.com/webpack/loader-runner/issues"},"repository":{"type":"git","url":"git+https://github.com/webpack/loader-runner.git"},"funding":{"type":"opencollective","url":"https://opencollective.com/webpack"},"license":"MIT","author":{"name":"Tobias Koppers @sokra"},"main":"lib/LoaderRunner.js","scripts":{"lint":"npm run lint:code && npm run fmt:check","lint:code":"eslint --cache .","fmt":"npm run fmt:base -- --log-level warn --write","fmt:check":"npm run fmt:base -- --check","fmt:base":"prettier --cache --ignore-unknown .","fix":"npm run fix:code && npm run fmt","fix:code":"npm run lint:code -- --fix","pretest":"npm run lint","test":"npm run test:basic","test:basic":"mocha --reporter spec","test:cover":"nyc --reporter=lcov npm run test:basic"},"devDependencies":{"@eslint/js":"^9.28.0","@eslint/markdown":"^8.0.1","@stylistic/eslint-plugin":"^5.2.3","globals":"^17.0.0","eslint":"^9.28.0","eslint-config-webpack":"^4.6.1","eslint-config-prettier":"^10.1.5","eslint-plugin-import":"^2.31.0","eslint-plugin-jest":"^29.15.2","eslint-plugin-jsdoc":"^62.9.0","eslint-plugin-n":"^17.19.0","eslint-plugin-prettier":"^5.4.1","eslint-plugin-unicorn":"^64.0.0","prettier":"^3.5.3","nyc":"^14.1.1","mocha":"^3.2.0","should":"^8.0.2"},"engines":{"node":">=6.11.5"},"gitHead":"a1a38886eeb46d0ce66bd96839bdb18c34f78301","_id":"loader-runner@4.3.2","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==","shasum":"9913d3a15971f8f635915e601fb5c9d495d918e9","tarball":"http://registry-npm.ywwl.com/loader-runner/download/loader-runner-4.3.2.tgz","fileCount":6,"unpackedSize":21025,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB6umF1GDQbi9kVXewkDnzT3APSTOgL5FUgsEVXTafw3AiEAwz+v+kl7F1U/ir+q7PVMn55AC2hnzJNqW1QVqfa375c="}],"size":6852,"noattachment":false,"key":"/loader-runner/-/loader-runner-4.3.2.tgz"},"_npmUser":{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},"directories":{},"maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"jhnns","email":"mail@johannesewald.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/loader-runner_4.3.2_1777040278607_0.051986146510258235"},"_hasShrinkwrap":false,"readme":"# loader-runner\n\n```js\nimport { runLoaders } from \"loader-runner\";\n\nrunLoaders(\n\t{\n\t\tresource: \"/abs/path/to/file.txt?query\",\n\t\t// String: Absolute path to the resource (optionally including query string)\n\n\t\tloaders: [\"/abs/path/to/loader.js?query\"],\n\t\t// String[]: Absolute paths to the loaders (optionally including query string)\n\t\t// {loader, options}[]: Absolute paths to the loaders with options object\n\n\t\tcontext: { minimize: true },\n\t\t// Additional loader context which is used as base context\n\n\t\tprocessResource: (loaderContext, resourcePath, callback) => {\n\t\t\t// ...\n\t\t},\n\t\t// Optional: A function to process the resource\n\t\t// Must have signature function(context, path, function(err, buffer))\n\t\t// By default readResource is used and the resource is added a fileDependency\n\n\t\treadResource: fs.readFile.bind(fs),\n\t\t// Optional: A function to read the resource\n\t\t// Only used when 'processResource' is not provided\n\t\t// Must have signature function(path, function(err, buffer))\n\t\t// By default fs.readFile is used\n\t},\n\t(err, result) => {\n\t\t// err: Error?\n\t\t// result.result: [Buffer | String, SourceMap?, Meta?]\n\t\t// The result as an array matching the arguments passed by the final normal loader\n\t\t// (typically [content, sourceMap, meta])\n\t\t// only available when no error occurred\n\t\t// result.resourceBuffer: Buffer\n\t\t// The raw resource as Buffer (useful for SourceMaps)\n\t\t// only available when no error occurred\n\t\t// result.cacheable: Bool\n\t\t// Is the result cacheable or do it require reexecution?\n\t\t// result.fileDependencies: String[]\n\t\t// An array of paths (existing files) on which the result depends on\n\t\t// result.missingDependencies: String[]\n\t\t// An array of paths (not existing files) on which the result depends on\n\t\t// result.contextDependencies: String[]\n\t\t// An array of paths (directories) on which the result depends on\n\t}\n);\n```\n\nMore documentation following...\n","publish_time":1777040278760,"_cnpm_publish_time":1777040278760,"dist-tags":{"latest":"4.3.2","old":"2.4.0"}}