{"name":"coffee-loader","version":"4.0.0","description":"coffee loader module for webpack","license":"MIT","repository":{"type":"git","url":"git+https://github.com/webpack-contrib/coffee-loader.git"},"author":{"name":"Tobias Koppers @sokra"},"homepage":"https://github.com/webpack-contrib/coffee-loader","bugs":{"url":"https://github.com/webpack-contrib/coffee-loader/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/webpack"},"main":"dist/cjs.js","engines":{"node":">= 14.15.0"},"scripts":{"start":"npm run build -- -w","clean":"del-cli dist","prebuild":"npm run clean","build":"cross-env NODE_ENV=production babel src -d dist --copy-files","commitlint":"commitlint --from=master","security":"npm audit --production","lint:prettier":"prettier --list-different .","lint:js":"eslint --cache .","lint":"npm-run-all -l -p \"lint:**\"","test:only":"cross-env NODE_ENV=test jest","test:watch":"npm run test:only -- --watch","test:coverage":"npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage","pretest":"npm run lint","test":"npm run test:coverage","prepare":"husky install && npm run build","release":"standard-version"},"peerDependencies":{"coffeescript":">= 2.0.0","webpack":"^5.0.0"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/preset-env":"^7.16.11","@commitlint/cli":"^17.0.0","@commitlint/config-conventional":"^17.0.0","@webpack-contrib/eslint-config-webpack":"^3.0.0","babel-jest":"^28.1.0","coffeescript":"2.7.0","cross-env":"^7.0.3","del":"^6.0.0","del-cli":"^4.0.1","eslint":"^8.12.0","eslint-config-prettier":"^8.5.0","eslint-plugin-import":"^2.25.4","husky":"^8.0.1","jest":"^28.1.0","lint-staged":"^12.3.7","memfs":"^3.4.1","npm-run-all":"^4.1.5","prettier":"^2.6.2","standard-version":"^9.3.2","webpack":"^5.71.0"},"keywords":["webpack"],"gitHead":"3c378f50f2bfde20cb1c2ae84821eb62c55ce94e","_id":"coffee-loader@4.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.10.0","dist":{"integrity":"sha512-RvgC8c0JwRew5lq3x2J+P4z9Cvan/v91muEvV90VJXcTuJbJQN20taZxfj6/XC4yysA8PInPGpxdB1J9LphLuQ==","shasum":"85284b489b0a63963da2b52e372111edf0565617","tarball":"http://registry-npm.ywwl.com/coffee-loader/download/coffee-loader-4.0.0.tgz","fileCount":7,"unpackedSize":9665,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiMXO7mGCh61D12f1GGvuZM91FmJ62stM9LJKhHhEgqAiBWkUGKUJj6l0e9QlNrCR2WXlBYH+PAEAiHSmdljgGZ0Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihV8sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpc2w//bB4qgjH6cjoGfGfWQEdvcDBN4O2Q7tLBIJeM5VyFuH9F76mk\r\nCw9zYiG0eHmNb22I1U/HdSZOZIQAa92tHUjUrHI4vt1MVy/8lNLknIQ8eSw6\r\nqhlOahnIjFNtCRPdKfej/buKWFSkS32V3Kn6WbFYA+uJ+awuyMvq5QSaIsqs\r\nr+hFBmfhuEwZxSfCeRX6RsIxuEdjH+ZE6ZrEmyu77MFNb+k8wKJ13dPEMhCg\r\nCRbiZPvbNd0EEygVsjqL/twvD4Kkit/XrpkhXPGx7aBDdeSH7uQUZNk53P/j\r\n8u2mpQqrWB0poVg2SNeRffEjKq+QuyOF5gkf2yyMmhF5yPWtkzLkNyjuxjM7\r\nRDSKif1u6wdmktgq+2Up2cpU+jSQusQDWMGyWpCeB0Ye8Gj0uiZA61IvvWYF\r\ndaBbmewmq/zNiInsJ3C4YB12aEk+E2pR0UHHDfc80XAlT1ZTvuQd6V7HBGvF\r\nz8pLH1y4TIYkdDwQB/6i4/nsTQFVA018v3vXJ0G2fp+ZXsM4f9Ihhkioti3R\r\nfoXQAEkwF2AEq/0Y/xKXw9IMpXnuI0RwNjGYCnC3R4QhFbJXBVSch3lJuQop\r\nEnnM7lTml/XKBgd9cAjA3CbfgYyzPC7MGT/zDJylSYk8Z0SnoB0/Eco4HSDr\r\nEkv2p3xbBVwBsGdhVpZREl5Smo1zRGDJJ1Y=\r\n=NREq\r\n-----END PGP SIGNATURE-----\r\n","size":3988,"noattachment":false,"key":"/coffee-loader/-/coffee-loader-4.0.0.tgz"},"_npmUser":{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},"directories":{},"maintainers":[{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"jhnns","email":"mail@johannesewald.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/coffee-loader_4.0.0_1652907820670_0.16374930511008223"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n  <img width=\"160\" height=\"160\" src=\"https://cdn.worldvectorlogo.com/logos/coffeescript.svg\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" hspace=\"20\" src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![discussion][discussion]][discussion-url]\n[![size][size]][size-url]\n\n# coffee-loader\n\nCompile [CoffeeScript](https://coffeescript.org/) to JavaScript.\n\n## Getting Started\n\nTo begin, you'll need to install `coffeescript` and `coffee-loader`:\n\n```console\nnpm install --save-dev coffeescript coffee-loader\n```\n\nor\n\n```console\nyarn add -D coffeescript coffee-loader\n```\n\nor\n\n```console\npnpm add -D coffeescript coffee-loader\n```\n\nThen add the plugin to your `webpack` config. For example:\n\n**file.coffee**\n\n```coffee\n# Assignment:\nnumber   = 42\nopposite = true\n\n# Conditions:\nnumber = -42 if opposite\n\n# Functions:\nsquare = (x) -> x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n  root:   Math.sqrt\n  square: square\n  cube:   (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n  print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)\n```\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.coffee$/,\n        loader: \"coffee-loader\",\n      },\n    ],\n  },\n};\n```\n\nAlternative usage:\n\n```js\nimport coffee from \"coffee-loader!./file.coffee\";\n```\n\nAnd run `webpack` via your preferred method.\n\n## Options\n\nType: `Object`\nDefault: `{ bare: true }`\n\nOptions for CoffeeScript. All possible options you can find [here](https://coffeescript.org/#nodejs-usage).\n\nDocumentation for the `transpile` option you can find [here](https://coffeescript.org/#transpilation).\n\n> **Note**\n>\n> The `sourceMap` option takes a value from the `compiler.devtool` value by default.\n\n> **Note**\n>\n> The `filename` option takes a value from webpack loader API. The option value will be ignored.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.coffee$/,\n        loader: \"coffee-loader\",\n        options: {\n          bare: false,\n          transpile: {\n            presets: [\"@babel/env\"],\n          },\n        },\n      },\n    ],\n  },\n};\n```\n\n## Examples\n\n### CoffeeScript and Babel\n\nFrom CoffeeScript 2 documentation:\n\n> **Note**\n>\n> CoffeeScript 2 generates JavaScript that uses the latest, modern syntax.\n> The runtime or browsers where you want your code to run might not support all of that syntax.\n> In that case, we want to convert modern JavaScript into older JavaScript that will run in older versions of Node or older browsers; for example, `{ a } = obj` into `a = obj.a`.\n> This is done via transpilers like Babel, Bublé or Traceur Compiler.\n\nYou'll need to install `@babel/core` and `@babel/preset-env` and then create a configuration file:\n\n```console\nnpm install --save-dev @babel/core @babel/preset-env\necho '{ \"presets\": [\"@babel/env\"] }' > .babelrc\n```\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.coffee$/,\n        loader: \"coffee-loader\",\n        options: {\n          transpile: {\n            presets: [\"@babel/env\"],\n          },\n        },\n      },\n    ],\n  },\n};\n```\n\n### Literate CoffeeScript\n\nFor using Literate CoffeeScript you should setup:\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.coffee$/,\n        loader: \"coffee-loader\",\n        options: {\n          literate: true,\n        },\n      },\n    ],\n  },\n};\n```\n\n## Contributing\n\nPlease take a moment to read our contributing guidelines if you haven't yet done so.\n\n[CONTRIBUTING](./.github/CONTRIBUTING.md)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm]: https://img.shields.io/npm/v/coffee-loader.svg\n[npm-url]: https://npmjs.com/package/coffee-loader\n[node]: https://img.shields.io/node/v/coffee-loader.svg\n[node-url]: https://nodejs.org\n[tests]: https://github.com/webpack-contrib/coffee-loader/workflows/coffee-loader/badge.svg\n[tests-url]: https://github.com/webpack-contrib/coffee-loader/actions\n[cover]: https://codecov.io/gh/webpack-contrib/coffee-loader/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/coffee-loader\n[discussion]: https://img.shields.io/github/discussions/webpack/webpack\n[discussion-url]: https://github.com/webpack/webpack/discussions\n[size]: https://packagephobia.now.sh/badge?p=coffee-loader\n[size-url]: https://packagephobia.now.sh/result?p=coffee-loader\n","publish_time":1652907820791,"_cnpm_publish_time":1652907820791,"dist-tags":{"latest":"5.0.4"}}