{"_id":"rc-source-loader","_rev":"453858","name":"rc-source-loader","description":"A loader for webpack that allows importing files as a String","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"chenshuai2144","email":""}],"time":{"modified":"2021-08-05T07:14:25.000Z","created":"2019-01-07T04:22:48.863Z","1.0.2":"2019-01-07T06:20:21.677Z","1.0.1":"2019-01-07T04:22:48.863Z"},"users":{},"author":{"name":"Tobias Koppers @sokra"},"repository":{"type":"git","url":"git+https://github.com/webpack-contrib/raw-loader.git"},"versions":{"1.0.2":{"name":"rc-source-loader","version":"1.0.2","description":"A loader for webpack that allows importing files as a String","license":"MIT","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/raw-loader.git"},"author":{"name":"Tobias Koppers @sokra"},"homepage":"https://github.com/webpack-contrib/raw-loader","bugs":{"url":"https://github.com/webpack-contrib/raw-loader/issues"},"main":"index.js","engines":{"node":">= 6.9.0"},"scripts":{"lint":"eslint --cache 'index.js' test","release":"standard-version","security":"npm audit","test":"jest"},"peerDependencies":{"webpack":"^4.3.0"},"dependencies":{"loader-utils":"^1.1.0"},"devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.1.6","@commitlint/cli":"^7.1.6","@commitlint/config-conventional":"^7.1.2","@webpack-contrib/eslint-config-webpack":"^3.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","cross-env":"^5.2.0","del":"^3.0.0","del-cli":"^1.1.0","eslint":"^5.10.0","eslint-plugin-import":"^2.14.0","eslint-plugin-prettier":"^3.0.0","husky":"^1.2.0","jest":"^23.6.0","lint-staged":"^8.1.0","memory-fs":"^0.4.1","prettier":"^1.11.1","standard-version":"^4.3.0","webpack":"^4.3.0","webpack-defaults":"^2.1.1"},"babel":{"presets":[["@babel/preset-env",{"targets":{"node":"6.9.0"},"useBuiltIns":"usage"}]]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"gitHead":"6af3b2c55a6f19bddc7d5fc3d146db8873483e6d","_id":"rc-source-loader@1.0.2","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"dist":{"shasum":"17798958b7910e65615e30f24266829c814cafa5","size":1730,"noattachment":false,"key":"/rc-source-loader/-/rc-source-loader-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-source-loader/download/rc-source-loader-1.0.2.tgz"},"maintainers":[{"name":"chenshuai2144","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-source-loader_1.0.2_1546842021551_0.3025106299525613"},"_hasShrinkwrap":false,"publish_time":1546842021677,"_cnpm_publish_time":1546842021677},"1.0.1":{"name":"rc-source-loader","version":"1.0.1","description":"A loader for webpack that allows importing files as a String","license":"MIT","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/raw-loader.git"},"author":{"name":"Tobias Koppers @sokra"},"homepage":"https://github.com/webpack-contrib/raw-loader","bugs":{"url":"https://github.com/webpack-contrib/raw-loader/issues"},"main":"index.js","engines":{"node":">= 6.9.0"},"scripts":{"lint":"eslint --cache 'index.js' test","release":"standard-version","security":"npm audit","test":"jest"},"peerDependencies":{"webpack":"^4.3.0"},"dependencies":{"loader-utils":"^1.1.0"},"devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/polyfill":"^7.0.0","@babel/preset-env":"^7.1.6","@commitlint/cli":"^7.1.6","@commitlint/config-conventional":"^7.1.2","@webpack-contrib/eslint-config-webpack":"^3.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","cross-env":"^5.2.0","del":"^3.0.0","del-cli":"^1.1.0","eslint":"^5.10.0","eslint-plugin-import":"^2.14.0","eslint-plugin-prettier":"^3.0.0","husky":"^1.2.0","jest":"^23.6.0","lint-staged":"^8.1.0","memory-fs":"^0.4.1","prettier":"^1.11.1","standard-version":"^4.3.0","webpack":"^4.3.0","webpack-defaults":"^2.1.1"},"babel":{"presets":[["@babel/preset-env",{"targets":{"node":"6.9.0"},"useBuiltIns":"usage"}]]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"gitHead":"d74e8bd061c1971468fd23f1e3a6430e085829cf","_id":"rc-source-loader@1.0.1","_npmVersion":"6.5.0","_nodeVersion":"11.4.0","_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"dist":{"shasum":"bd7d59859b045a5875532eba40cfa569bbafd351","size":1321,"noattachment":false,"key":"/rc-source-loader/-/rc-source-loader-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rc-source-loader/download/rc-source-loader-1.0.1.tgz"},"maintainers":[{"name":"chenshuai2144","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-source-loader_1.0.1_1546834968753_0.6453392096372546"},"_hasShrinkwrap":false,"publish_time":1546834968863,"_cnpm_publish_time":1546834968863}},"readme":"# rc-source-loader\n\nThis package can directly read the source code of the file. Without any conversion\n\n### demo.js\n\n```js\nexport default function generateErrorTemplate(err) {\n  const strToHtml = (str) =>\n    (str || '')\n      .replace(/&/g, '&')\n      .replace(/</g, '<')\n      .replace(/>/g, '>')\n      .replace(/\"/g, '')\n      .replace(/'/g, \"'\")\n      .replace(/\\[(\\d+)m/g, '')\n      .replace(/ /g, ' ')\n      .replace(/\\n/g, '<br />');\n  const template = `\n          <!DOCTYPE html> \n          <html>\n          <head>\n          </head>\n          <body>\n            <div>\n              ${strToHtml(err.toString()) || ''}\n            </div>\n          </body>\n          </html>`;\n  return template;\n}\n```\n\n### Use\n\n```\nimport demo from 'rrc-source-loader!./demo.js';\n// Directly output the contents of this js\nconsole.log(demo);\n```\n","_attachments":{},"homepage":"https://github.com/webpack-contrib/raw-loader","bugs":{"url":"https://github.com/webpack-contrib/raw-loader/issues"},"license":"MIT"}