-
Notifications
You must be signed in to change notification settings - Fork 50
CoffeeScript support #66
Comments
@laurentpayot Can you generate a project with current 0.15 CLI (and choose "yes" to everything, including the store)? Then I'd need you to convert all .js files in the src to be .coffee files instead. Last step is to share that with me. I'll then add CoffeeScript support out of the box. Thank you! |
@rstoenescu No problem. Will do that Monday morning. |
@rstoenescu here is the repo you asked for: https://github.com/laurentpayot/quasar-CS-kit |
Oops I forgot i18n and ie11 (default no), I'm going to add them asap… |
Added i18n. Tested and ok, like the store by the way. ie11 support was just a boolean in quasar conf so I let it to false. Let me know if there are some issues. |
@laurentpayot - is it possible for you to bring this up to speed for 0.16? |
@nothingismagick hopefully will do that today or tomorrow. |
Can't do that for quasar 0.16 my machine for now as I'm working with Vue CLI 3 and it seems incompatible with Quasar CLI:
Anyway the changes to make are described in the first post of this issue. |
I meant I use Vue CLI 3. Modified my last comment. |
As Quasar 0.16.2 is using webpack-chain, here are the webpack-chain config options for CoffeeScript I use with Vue CLI 3 . Should be the same for Quasar CLI (except maybe the cache-loader section). chainWebpack: config => {
config
.entry('app')
.clear()
.add('./src/main.coffee')
.end()
config.resolve.extensions
.prepend('.coffee')
config.module
.rule('coffeescript')
.test(/\.coffee$/)
.include
.add(path.resolve(__dirname, './src'))
.end()
.exclude
.add(path.resolve(__dirname, './node_modules'))
.end()
.use('coffee')
.loader('coffee-loader')
.end()
.use('babel')
.loader('babel-loader')
.before('coffee') // see https://github.com/mozilla-neutrino/webpack-chain/issues/28
.end()
.use('cache')
.loader('cache-loader')
.before('babel') // see https://github.com/mozilla-neutrino/webpack-chain/issues/28
.options({
cacheDirectory: path.resolve(__dirname, './node_modules/.cache/cache-loader')
})
.end()
.end()
}, |
For CoffeeScript I use the following /quasar.conf.js > build > extendWebpack(cfg).
There is a trick with Vuex because the presence of
store/index.js
is hardcoded in https://github.com/quasarframework/quasar-cli/blob/dev/lib/quasar-config.jsso you can't use
store/index.coffee
. A quick workaround is to use the followingstore/index.js
:The text was updated successfully, but these errors were encountered: