Ver código fonte

Improve README

Yaroslav Kasperovich 5 anos atrás
pai
commit
f88ed10a89
3 arquivos alterados com 6 adições e 2 exclusões
  1. 3 1
      README.md
  2. 2 0
      index.js
  3. 1 1
      package.json

+ 3 - 1
README.md

@@ -6,12 +6,14 @@ With built-in:
 * `cache-loader`
 * `thread-loader`
 * `babel-loader`
+* `bower_components` and `node_modules` ignoring
 
 ## Installation
 
 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:
 
 ```shell
+npm remove @vue/cli-plugin-eslint # or see Troubleshooting
 vue add coffee
 ```
 
@@ -54,4 +56,4 @@ module.exports = {
 
 ## Troubleshooting
 
-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. 
+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. 

+ 2 - 0
index.js

@@ -24,5 +24,7 @@ module.exports = (API, projectOptions) => {
     }
 
     coffeeRule.use("coffee-loader").loader(require.resolve("coffee-loader"));
+
+    coffeeRule.exclude.add(() => ["node_modules", "bower_components"]).end();
   });
 };

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "vue-cli-plugin-coffee",
-  "version": "0.5.9",
+  "version": "0.5.11",
   "description": "CoffeeScript2 support for your @vue/cli project",
   "main": "index.js",
   "repository": {