From 0efcd4a719b3944b16381691a3b66da09649b9e8 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Wed, 10 Jun 2026 15:58:28 -0400 Subject: [PATCH 1/3] chore(README): prepare for new website --- README.md | 88 +++++++++++++++---------------------------------------- 1 file changed, 23 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 44e417c..37eefa7 100644 --- a/README.md +++ b/README.md @@ -20,27 +20,21 @@ Compile [CoffeeScript](https://coffeescript.org/) to JavaScript. To begin, you'll need to install `coffeescript` and `coffee-loader`: -```console +```console displayName="npm" npm install --save-dev coffeescript coffee-loader ``` -or - -```console +```bash displayName="yarn" yarn add -D coffeescript coffee-loader ``` -or - -```console +```bash displayName="pnpm" pnpm add -D coffeescript coffee-loader ``` Then add the loader to your `webpack.config.js`. For example: -**file.coffee** - -```coffee +```coffee displayName="file.coffee" # Assignment: number = 42 opposite = true @@ -71,9 +65,7 @@ alert "I knew it!" if elvis? cubes = (math.cube num for num in list) ``` -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -92,28 +84,20 @@ Alternative usage: import coffee from "coffee-loader!./file.coffee"; ``` -Finally, run `webpack` using the method you normally use (e.g., via CLI or an npm script). +Finally, run `webpack` using the method you normally use (e.g., via CLI or an +npm script). ## Options -Type: `Object` -Default: `{ bare: true }` - You can find all available CoffeeScript options [here](https://coffeescript.org/#nodejs-usage). -For documentation on the `transpile` option, see [this section](https://coffeescript.org/#transpilation). - -> [!NOTE] -> -> The `sourceMap` option takes a value from the `compiler.devtool` value by default. - -> [!NOTE] -> -> The `filename` option takes a value from webpack loader API, but it's value will be ignored. +The `sourceMap` option takes a value from the `compiler.devtool` value by +default. -**webpack.config.js** +The `filename` option takes a value from webpack loader API, but its value +will be ignored. -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -138,23 +122,22 @@ module.exports = { From CoffeeScript 2 documentation: -> [!NOTE] -> -> CoffeeScript 2 generates JavaScript using the latest, modern syntax. -> The runtime or browsers where you want your code to run might not support all of that syntax. -> In that case, modern JavaScript needs to be converted into an older JavaScript that will run in older versions of Node or older browsers; for example: `{ a } = obj` into `a = obj.a`. -> This conversion is done using transpilers like Babel, Bublé or Traceur Compiler. +CoffeeScript 2 generates JavaScript using the latest, modern syntax. The +runtime or browsers where you want your code to run might not support all of +that syntax. In that case, modern JavaScript needs to be converted into an +older JavaScript that will run in older versions of Node or older browsers; +for example: `{ a } = obj` into `a = obj.a`. This conversion is done using +transpilers like Babel, Bublé or Traceur Compiler. -You'll need to install `@babel/core` and `@babel/preset-env` and then create a configuration file: +You'll need to install `@babel/core` and `@babel/preset-env` and then create a +configuration file: ```console npm install --save-dev @babel/core @babel/preset-env echo '{ "presets": ["@babel/env"] }' > .babelrc ``` -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -174,11 +157,9 @@ module.exports = { ### Literate CoffeeScript -To use Literate CoffeeScript you should setup: +To use Literate CoffeeScript you should set up: -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -193,26 +174,3 @@ module.exports = { }, }; ``` - -## Contributing - -Please take a moment to read our contributing guidelines if you haven't yet done so. - -[CONTRIBUTING](https://github.com/webpack/coffee-loader?tab=contributing-ov-file#contributing) - -## License - -[MIT](./LICENSE) - -[npm]: https://img.shields.io/npm/v/coffee-loader.svg -[npm-url]: https://npmjs.com/package/coffee-loader -[node]: https://img.shields.io/node/v/coffee-loader.svg -[node-url]: https://nodejs.org -[tests]: https://github.com/webpack/coffee-loader/workflows/coffee-loader/badge.svg -[tests-url]: https://github.com/webpack/coffee-loader/actions -[cover]: https://codecov.io/gh/webpack/coffee-loader/branch/main/graph/badge.svg -[cover-url]: https://codecov.io/gh/webpack/coffee-loader -[discussion]: https://img.shields.io/github/discussions/webpack/webpack -[discussion-url]: https://github.com/webpack/webpack/discussions -[size]: https://packagephobia.now.sh/badge?p=coffee-loader -[size-url]: https://packagephobia.now.sh/result?p=coffee-loader From 526ae2b1b7acfbddce4841bdf45b5868f8c14d79 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Wed, 10 Jun 2026 16:01:29 -0400 Subject: [PATCH 2/3] fixup! --- README.md | 77 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 37eefa7..d22f36b 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@ -[![npm][npm]][npm-url] -[![node][node]][node-url] -[![tests][tests]][tests-url] -[![coverage][cover]][cover-url] -[![discussion][discussion]][discussion-url] -[![size][size]][size-url] +[![npm](https://img.shields.io/npm/v/coffee-loader.svg)](https://npmjs.com/package/coffee-loader) +[![node](https://img.shields.io/node/v/coffee-loader.svg)](https://nodejs.org) +[![tests](https://github.com/webpack/coffee-loader/workflows/coffee-loader/badge.svg)](https://github.com/webpack/coffee-loader/actions) +[![coverage](https://codecov.io/gh/webpack/coffee-loader/branch/main/graph/badge.svg)](https://codecov.io/gh/webpack/coffee-loader) +[![discussion](https://img.shields.io/github/discussions/webpack/webpack)](https://github.com/webpack/webpack/discussions) +[![size](https://packagephobia.now.sh/badge?p=coffee-loader)](https://packagephobia.now.sh/result?p=coffee-loader) # coffee-loader @@ -20,21 +20,27 @@ Compile [CoffeeScript](https://coffeescript.org/) to JavaScript. To begin, you'll need to install `coffeescript` and `coffee-loader`: -```console displayName="npm" +```console npm install --save-dev coffeescript coffee-loader ``` -```bash displayName="yarn" +or + +```console yarn add -D coffeescript coffee-loader ``` -```bash displayName="pnpm" +or + +```console pnpm add -D coffeescript coffee-loader ``` Then add the loader to your `webpack.config.js`. For example: -```coffee displayName="file.coffee" +**file.coffee** + +```coffee # Assignment: number = 42 opposite = true @@ -65,7 +71,9 @@ alert "I knew it!" if elvis? cubes = (math.cube num for num in list) ``` -```js displayName="webpack.config.js" +**webpack.config.js** + +```js module.exports = { module: { rules: [ @@ -84,20 +92,28 @@ Alternative usage: import coffee from "coffee-loader!./file.coffee"; ``` -Finally, run `webpack` using the method you normally use (e.g., via CLI or an -npm script). +Finally, run `webpack` using the method you normally use (e.g., via CLI or an npm script). ## Options +Type: `Object` +Default: `{ bare: true }` + You can find all available CoffeeScript options [here](https://coffeescript.org/#nodejs-usage). -The `sourceMap` option takes a value from the `compiler.devtool` value by -default. +For documentation on the `transpile` option, see [this section](https://coffeescript.org/#transpilation). + +> [!NOTE] +> +> The `sourceMap` option takes a value from the `compiler.devtool` value by default. -The `filename` option takes a value from webpack loader API, but its value -will be ignored. +> [!NOTE] +> +> The `filename` option takes a value from webpack loader API, but it's value will be ignored. -```js displayName="webpack.config.js" +**webpack.config.js** + +```js module.exports = { module: { rules: [ @@ -122,22 +138,23 @@ module.exports = { From CoffeeScript 2 documentation: -CoffeeScript 2 generates JavaScript using the latest, modern syntax. The -runtime or browsers where you want your code to run might not support all of -that syntax. In that case, modern JavaScript needs to be converted into an -older JavaScript that will run in older versions of Node or older browsers; -for example: `{ a } = obj` into `a = obj.a`. This conversion is done using -transpilers like Babel, Bublé or Traceur Compiler. +> [!NOTE] +> +> CoffeeScript 2 generates JavaScript using the latest, modern syntax. +> The runtime or browsers where you want your code to run might not support all of that syntax. +> In that case, modern JavaScript needs to be converted into an older JavaScript that will run in older versions of Node or older browsers; for example: `{ a } = obj` into `a = obj.a`. +> This conversion is done using transpilers like Babel, Bublé or Traceur Compiler. -You'll need to install `@babel/core` and `@babel/preset-env` and then create a -configuration file: +You'll need to install `@babel/core` and `@babel/preset-env` and then create a configuration file: ```console npm install --save-dev @babel/core @babel/preset-env echo '{ "presets": ["@babel/env"] }' > .babelrc ``` -```js displayName="webpack.config.js" +**webpack.config.js** + +```js module.exports = { module: { rules: [ @@ -157,9 +174,11 @@ module.exports = { ### Literate CoffeeScript -To use Literate CoffeeScript you should set up: +To use Literate CoffeeScript you should setup: -```js displayName="webpack.config.js" +**webpack.config.js** + +```js module.exports = { module: { rules: [ From a726c1d86278645fb624cec180f368b5e2b17637 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Wed, 10 Jun 2026 16:05:38 -0400 Subject: [PATCH 3/3] fixup! --- README.md | 67 +++++++++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index d22f36b..ea5e63f 100644 --- a/README.md +++ b/README.md @@ -20,27 +20,21 @@ Compile [CoffeeScript](https://coffeescript.org/) to JavaScript. To begin, you'll need to install `coffeescript` and `coffee-loader`: -```console +```console displayName="npm" npm install --save-dev coffeescript coffee-loader ``` -or - -```console +```bash displayName="yarn" yarn add -D coffeescript coffee-loader ``` -or - -```console +```bash displayName="pnpm" pnpm add -D coffeescript coffee-loader ``` Then add the loader to your `webpack.config.js`. For example: -**file.coffee** - -```coffee +```coffee displayName="file.coffee" # Assignment: number = 42 opposite = true @@ -71,9 +65,7 @@ alert "I knew it!" if elvis? cubes = (math.cube num for num in list) ``` -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -92,28 +84,20 @@ Alternative usage: import coffee from "coffee-loader!./file.coffee"; ``` -Finally, run `webpack` using the method you normally use (e.g., via CLI or an npm script). +Finally, run `webpack` using the method you normally use (e.g., via CLI or an +npm script). ## Options -Type: `Object` -Default: `{ bare: true }` - You can find all available CoffeeScript options [here](https://coffeescript.org/#nodejs-usage). -For documentation on the `transpile` option, see [this section](https://coffeescript.org/#transpilation). +The `sourceMap` option takes a value from the `compiler.devtool` value by +default. -> [!NOTE] -> -> The `sourceMap` option takes a value from the `compiler.devtool` value by default. +The `filename` option takes a value from webpack loader API, but its value +will be ignored. -> [!NOTE] -> -> The `filename` option takes a value from webpack loader API, but it's value will be ignored. - -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -136,25 +120,22 @@ module.exports = { ### CoffeeScript and Babel -From CoffeeScript 2 documentation: - -> [!NOTE] -> -> CoffeeScript 2 generates JavaScript using the latest, modern syntax. -> The runtime or browsers where you want your code to run might not support all of that syntax. -> In that case, modern JavaScript needs to be converted into an older JavaScript that will run in older versions of Node or older browsers; for example: `{ a } = obj` into `a = obj.a`. -> This conversion is done using transpilers like Babel, Bublé or Traceur Compiler. +CoffeeScript 2 generates JavaScript using the latest, modern syntax. The +runtime or browsers where you want your code to run might not support all of +that syntax. In that case, modern JavaScript needs to be converted into an +older JavaScript that will run in older versions of Node or older browsers; +for example: `{ a } = obj` into `a = obj.a`. This conversion is done using +transpilers like Babel, Bublé or Traceur Compiler. -You'll need to install `@babel/core` and `@babel/preset-env` and then create a configuration file: +You'll need to install `@babel/core` and `@babel/preset-env` and then create a +configuration file: ```console npm install --save-dev @babel/core @babel/preset-env echo '{ "presets": ["@babel/env"] }' > .babelrc ``` -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [ @@ -174,11 +155,9 @@ module.exports = { ### Literate CoffeeScript -To use Literate CoffeeScript you should setup: +To use Literate CoffeeScript you should set up: -**webpack.config.js** - -```js +```js displayName="webpack.config.js" module.exports = { module: { rules: [