Skip to content

Commit f88ed10

Browse files
author
Yaroslav Kasperovich
committed
Improve README
1 parent 545ccef commit f88ed10

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ With built-in:
66
* `cache-loader`
77
* `thread-loader`
88
* `babel-loader`
9+
* `bower_components` and `node_modules` ignoring
910

1011
## Installation
1112

1213
According to [this](https://cli.vuejs.org/guide/plugins-and-presets.html#installing-plugins-in-an-existing-project) you are able to install community plugins as follows:
1314

1415
```shell
16+
npm remove @vue/cli-plugin-eslint # or see Troubleshooting
1517
vue add coffee
1618
```
1719

@@ -54,4 +56,4 @@ module.exports = {
5456

5557
## Troubleshooting
5658

57-
Note that vue-loader uses `lang="coffee"` to identify components which are using Coffeescript, but `lang="coffee"` is not recognizable for ESLint. Fortunately, ESLint (following traditional HTML) uses `type="xxx"` to identify the type of scripts. As long as a `<script>` tag has any type other than javascript, ESLint would mark the script as non-javascript, and skips linting it. Coffeescript’s convention is to use `type="text/coffeescript"` to identify itself. Therefore, in your Vue components which are using Coffeescript, using both `lang` and `type` to avoid ESLint warnings.
59+
If you're using ESLint, note that vue-loader uses `lang="coffee"` to identify components which are using Coffeescript, but `lang="coffee"` is not recognizable for ESLint. Fortunately, ESLint (following traditional HTML) uses `type="xxx"` to identify the type of scripts. As long as a `<script>` tag has any type other than javascript, ESLint would mark the script as non-javascript, and skips linting it. Coffeescript’s convention is to use `type="text/coffeescript"` to identify itself. Therefore, in your Vue components which are using Coffeescript, using both `lang` and `type` to avoid ESLint warnings.

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ module.exports = (API, projectOptions) => {
2424
}
2525

2626
coffeeRule.use("coffee-loader").loader(require.resolve("coffee-loader"));
27+
28+
coffeeRule.exclude.add(() => ["node_modules", "bower_components"]).end();
2729
});
2830
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-cli-plugin-coffee",
3-
"version": "0.5.9",
3+
"version": "0.5.11",
44
"description": "CoffeeScript2 support for your @vue/cli project",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)