Open laurentpayot opened 6 years ago
@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:
laurent@asus:~/nodejs$ npm -v
6.1.0
laurent@asus:~/nodejs$ npm list -g --depth=0
/usr/local/lib
├── @vue/cli@3.0.0-beta.11
├── coffeescript@2.3.0
├── firebase-tools@3.18.5
├── n@2.1.11
├── npm@6.1.0
├── quasar-cli@0.16.1
└── snyk@1.80.1
laurent@asus:~/nodejs$ quasar init quasar016-CS-kit
Running command: vue init 'quasarframework/quasar-starter-kit' quasar016-CS-kit
Command vue init requires a global addon to be installed.
Please run yarn global add @vue/cli-init and try again.
app:init ⚠️ Something went wrong... Try running the "vue init" command above manually. +0ms
app:init Reasons for failure: Package @vue/cli and @vue/cli-init are not installed globally, specified template is unavailable or it failed to download. +4ms
laurent@asus:~/nodejs$
Anyway the changes to make are described in the first post of this issue.
I am developing on quasar-cli and this is what I see when I run quasar info
:
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.js so you can't usestore/index.coffee
. A quick workaround is to use the followingstore/index.js
: