Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Vuex #47

Closed
strixy opened this issue May 18, 2017 · 7 comments
Closed

Feature request: Vuex #47

strixy opened this issue May 18, 2017 · 7 comments
Assignees

Comments

@strixy
Copy link

strixy commented May 18, 2017

Any interest in adding Vuex as well? I've used your project here twice and I like it. I look forward to using it more.

I find that adding Vuex is almost always my next step and even when it's not, it's only because I'm rolling my own for very small testing projects. In those cases, I would be just as happy to have Vuex already installed.

This is just a suggestion. You might have other plans or use cases to meet and if so, no worries at all.

I hate having to post this as an issue. Is there a better way to have this conversation? I'm relatively new to Github still.

Thank you for your efforts on this project already. Greatly appreciated.

@centrual
Copy link
Collaborator

centrual commented May 18, 2017

Hello @strixy

Vuex not for everybody. So i haven't plan to add vuex into the template. But you can do it yourself. Check #40 please.

I changed my mind, adding different versions of the template soon:
cordova-template-framework7-vue-vuex-babel-webpack
cordova-template-framework7-vue-vuex-webpack
cordova-template-framework7-vue-babel-webpack
cordova-template-framework7-babel-webpack
cordova-template-framework7-webpack
cordova-template-vue-vuex-babel-webpack
cordova-template-vue-vuex-webpack
cordova-template-vue-babel-webpack
cordova-template-vue-webpack
cordova-template-babel-webpack
cordova-template-webpack

Have a great day!

@strixy
Copy link
Author

strixy commented May 25, 2017

Thank you for agreeing to add Vuex. It appears in the official Vue documentation as the only alternative to DIY state management.

Good idea to mention Babel. Come to think of it, don't you have Vueify already included as well? You should maybe mention that in the docs. That's a big win too.

When you say "Vuex not for everybody", what other options are there besides creating your own? I'm curious, is there a cool toy I haven't played with yet?

@luckynum7
Copy link

May I mention two JavaScript database here,

  1. PouchDB: PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser.
  2. LokiJS: LokiJS is an in-memory database which prioritises performance over everything

I think both are very popular database for now. I used LokiJS in my project, with IndexedDb adapter (there's a file adapter also.)

When use lokijs, there is a gotcha when build with webpack (Cannot resolve module 'fs'). And the solution: pugjs/pug-loader#8 (comment)

node: {
  fs: "empty"
}

There also someone mentioned config like target: "electron" can solve the fs problem webpack/webpack#3012 (comment) for electron. And I found the target config here

    "target": {
      "anyOf": [
        {
          "enum": [
            "web",
            "webworker",
            "node",
            "async-node",
            "node-webkit",
            "atom",
            "electron",
            "electron-main",
            "electron-renderer"
          ]
        },

Will try to use taget: "web" to see if I can solve the fs module not found thing someday.

@strixy
Copy link
Author

strixy commented Jun 5, 2017

Thank you!

@yipcma
Copy link

yipcma commented Jun 10, 2017

cordova-template-framework7-vue-vuex-babel-webpack +1

1 similar comment
@lroal
Copy link

lroal commented Jun 13, 2017

cordova-template-framework7-vue-vuex-babel-webpack +1

@caiobiodere
Copy link
Owner

I created a new release that is using Vuex and babel features :)

you can check on (2.0.3):
https://github.com/caiobiodere/cordova-template-framework7-vue-webpack/releases/tag/2.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants