|
5 tahun lalu | |
---|---|---|
.eslintrc | 5 tahun lalu | |
.gitignore | 5 tahun lalu | |
.prettierrc | 5 tahun lalu | |
README.md | 5 tahun lalu | |
generator.js | 6 tahun lalu | |
index.js | 5 tahun lalu | |
package.json | 5 tahun lalu | |
yarn.lock | 5 tahun lalu |
CoffeeScript2 support for the projects created with @vue/cli.
According to this you are able to install community plugins as follows:
vue add coffee
According to this you can add entries using your vue.config.js
like so:
// vue.config.js
module.exports = {
configureWebpack: {
entry: {
'new-entry': 'path/to/new/entry.coffee'
}
}
}
I found this package but apparently it does some main.coffee
searching and replacement. While it is not bad by any means, it seems to me like a custom behavior. Want to keep things as clean as possible :sparkles:
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.