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

🖥 🔧 Vue.js #7

Closed
2 of 5 tasks
EricSimons opened this issue Apr 19, 2017 · 29 comments
Closed
2 of 5 tasks

🖥 🔧 Vue.js #7

EricSimons opened this issue Apr 19, 2017 · 29 comments
Labels

Comments

@EricSimons
Copy link
Member

EricSimons commented Apr 19, 2017

Current Status

Codebase in progress @ github.com/vilsbole/realworld-vue

Interested in helping out? Say hello! 🎉 gitter.im/realworld-dev/vue

Todo:

  • 🏁 Fork the starter repo & post the link in this issue
  • 🎨 Create logo for repo & update issue status (@EricSimons)
  • 🔨 Implement all of Conduit's functionality per the spec & API
  • 👀 Peer review of final codebase by RealWorld admins & community (RFC)
  • 🎉 Tag v1 release, move repo to main org, and officially list it on the README!

Anyone out there interested in this? Many folks have been asking for a RealWorld Vue codebase.

@mchandleraz
Copy link

I've been interested in getting into Vue lately... I don't think I've got time today, but maybe over the weekend. Definitely by Monday I should have a PR. I'll update this issue once I'm done :)

@EricSimons
Copy link
Member Author

EricSimons commented Apr 21, 2017

Awesome! Just saw your fork of the boilerplate :)

For those out there interested in helping/watching, you can check out @mchandleraz WIP repo over at https://github.com/mchandleraz/realworld-vue

@EricSimons EricSimons changed the title Vue.js Frontend Vue.js [Frontend] Apr 21, 2017
@mchandleraz
Copy link

Thanks for updating, Eric. I was just coming to add a link to my repo and let others know they're welcome to help. If anyone wants to join, open an Issue or hit me up on Twitter @mchandleraz so we can coordinate our efforts.

-Matt

@EricSimons
Copy link
Member Author

@mchandleraz FYI I made a custom logo that you can use for the README:

vue-realworld-logo

@EricSimons
Copy link
Member Author

Just set up the Gitter chatroom for this! Lets do collaborator coordination in there 👍

cc/ @mchandleraz

@EricSimons EricSimons changed the title Vue.js [Frontend] 🖥 🔧 Vue.js [Frontend] Apr 24, 2017
@EricSimons EricSimons changed the title 🖥 🔧 Vue.js [Frontend] 🖥 🔧 Vue.js Apr 24, 2017
@jamesbrewerdev
Copy link

@mchandleraz Any updates on this? Anything we can do to help?

@michalzagrodzki
Copy link

@mchandleraz I would be happy to contribute with development of this repo. Can I send my pull-requests?

@EricSimons
Copy link
Member Author

@michalzagrodzki feel free to make PR's — I'm sure @mchandleraz would really appreciate it!

@atilacamurca
Copy link

@mchandleraz the issues are disabled, can you enable back, please?

@jamesbrewerdev
Copy link

jamesbrewerdev commented Apr 26, 2017 via email

@mchandleraz
Copy link

Sorry guys, been super busy w/ life. Just got Issues enabled, and I'm taking a look at the PRs now. Thanks for the help everyone.

@EricSimons
Copy link
Member Author

No worries @mchandleraz! 🍻

@vilsbole
Copy link

Since @mchandleraz is MIA since a few months, I started a new fork https://github.com/vilsbole/realworld-vue
For the moment, it's simply implements Home, Articles, and Comments.
There is still a lot to do, but with your help we should be able to finish quickly

@michalzagrodzki
Copy link

@vilsbole Lovely idea. When I will have some time will send pull requests.

@EricSimons
Copy link
Member Author

@vilsbole @michalzagrodzki awesome! How is the progress going? Should I update this issue to point at your new repo? Lmk!

@vilsbole
Copy link

@EricSimons That would be great! It's moving forward smoothly, there are still a few tickets and it should be simple to complete.

@EricSimons
Copy link
Member Author

@vilsbole just updated this issue to point at your repo! 👍

@disjfa
Copy link

disjfa commented Oct 30, 2017

Just saw this, and i wanted to mention my kazoo repo, i like real world examples and am building a real world example for vue as an example. And then i found this one. In my example i mention and setup some extra code splitting in modules for each page type. Maybe useful.

I also have a couple of medium posts for explaining mt things https://medium.com/@disjfa/lets-store-some-data-in-a-vue-app-808d8b86cb79 Just for info.

@vilsbole
Copy link

@disjfa Nice article! I love the module code splitting. It would be nice to have in the project, so please feel free to submit a PR.

@vilsbole
Copy link

vilsbole commented Dec 3, 2017

@EricSimons We're reading for the peer-review. I made a PR to the starter-kit, should i submit elsewhere as well?

@EricSimons
Copy link
Member Author

@vilsbole so sorry about my delay here, I'm just seeing this now! I just spun up a new repo for it and added y'all to it: https://github.com/gothinkster/vue-realworld-example-app

I'm pinging Evan You now to see if he/anyone else might be able to help with the RFC 👍 Awesome work everyone!!

@EricSimons
Copy link
Member Author

FYI I just added this to the homepage- keep up the great work y'all!!

@LinusBorg
Copy link

LinusBorg commented Mar 16, 2018

Hi everyone,

I'm Thorsten from the Vue.js core team. I was asked to tak a look at this. Great work so far, thanks to everyone contributing!

I didn't have much time to go into the details, so I chose to take a look at the resulting bundle first, as it was mentioned to me that the bundle was surprisingly big, compared to e.g. the react example.

And in fact, the minified vendor bundle comes in with a whopping 957kB! that's quite heavy, I would say:

bildschirmfoto 2018-03-16 um 20 06 29

So I ran npm run build --report to see what gets included, and noticed a few things:

bildschirmfoto 2018-03-16 um 19 42 36

So on first sight we might realize that there are quite a lot of heavy dependencies in the vendor bundle that you won't find in the react example, whose only "external" dependenies apart from all things directly related to react&redux&router are:

{
  "dependencies": {
     "": "excluded all things react-related",
    "marked": "^0.3.6",
    "superagent": "^2.3.0",
    "superagent-promise": "^1.1.0"
  },
}

By comprison, this repositoy includes these additional dependencies:

"dependencies": {
     "": "excluded all things directly vue-related",
    "axios": "^0.16.2",
    "moment": "^2.19.2",
    "vue-axios": "^2.0.2",
    "vue-markdown": "^2.2.4",
  },

Disclaimer: all package sizes from https://bundlephobia.com

  • vue-axios is fine, because it's just a thin wrapper around axioswhich we need for api requests.
  • moment on the other hand, is included with all locales, adding an estimated 220kB minified to the bundle alone. the react example doesn't add any date lib at all, neither does the angular example (but angular comes with some predefined 'pipes' for that I think).
  • vue-markdown heas some very heavy dependencies, and adds 528.1kB minified(!). This is mostly because it has these dependecies:
"dependencies": {
    "highlight.js": "^9.12.0",
    "markdown-it": "^6.0.1",
    "markdown-it-abbr": "^1.0.3",
    "markdown-it-deflist": "^2.0.1",
    "markdown-it-emoji": "^1.1.1",
    "markdown-it-footnote": "^2.0.0",
    "markdown-it-ins": "^2.0.0",
    "markdown-it-katex": "^2.0.3",
    "markdown-it-mark": "^2.0.0",
    "markdown-it-sub": "^1.0.0",
    "markdown-it-sup": "^1.0.0",
    "markdown-it-task-lists": "^2.0.1",
    "markdown-it-toc-and-anchor": "^4.1.2"
  }

Which is nice because it adds so much cool functionality, but makes the app super-heavy. By comparison, the markdown-lib that the react example uses only adds 17.8kB minified - markdown-it alone, without all the extensions listed above, is 88kB minified.

So by replacing vue-markdown with marked, and repacing moment with e.g. date-fns (29kB minified), or just doing it by hand, like I think the react example did, would cut down vendor bundle size from 957 to around 260 kB (with date-fns) or 230kB (with date-formatting done manually).

That would also bring this example closer to feature-parity with the other implementations, who don't support syntax highlighting, emojis, MathML, date locales and all the features that the above dependencies include (wether or not the Vue app actually uses them.

I hope this helps improving this example a fair bit, and I will look further into it this weekend (especially the actual implementation), provided I find the time between IKEA and a family birthday.

Keep up the good work!

@atilacamurca
Copy link

moment already replaced by date-fns on PR gothinkster/vue-realworld-example-app#18

@LinusBorg
Copy link

Oh geez, did I analyse the wrong repository? Sorry! :-P

@atilacamurca
Copy link

we must disable https://github.com/vilsbole/realworld-vue or redirect to https://github.com/gothinkster/vue-realworld-example-app/ to avoid this kind of confusion.

cc @vilsbole

@vilsbole
Copy link

vilsbole commented Mar 18, 2018

@LinusBorg Thanks a ton for taking a look at the project!

Indeed vue-markdown is extremely heavy for the few features we use. By replacing it with marked we're now at a more reasonable size of 265kb. As for data-fns, we could do of course make a custom implementation, but unless we're enter a bundle size competition I'm in favour of not to reinventing the wheel.

screen shot 2018-03-17 at 16 49 25

Knowing that the project's code style is still heterogenous, I look forward to reading your review!

@vilsbole
Copy link

@atilacamurca I can't find a way to redirect the initial repo (without an ownership change), so I updated the description and README.

@LinusBorg
Copy link

@vilsbole agreed, date-fns is fine. The main point is to keep the number and kind of framework-independent dependencies roughly equal, so bundle sizes are comparable. It's not a bundle-size contest, but it's an important detail nonetheless.

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

No branches or pull requests

8 participants