vue-examples icon indicating copy to clipboard operation
vue-examples copied to clipboard

Add demo

Open notiv-nt opened this issue 5 years ago • 30 comments

Github-pages ? codepen.io codesandbox.io

notiv-nt avatar Feb 08 '19 13:02 notiv-nt

Great idea! I'll look into these this weekend. Do you have a preference between the two?

peterlamar avatar Feb 08 '19 22:02 peterlamar

I think codesandbox will be better

Just open site,

Open vue template,

Add dependencies

image

App.vue

image

main.js

image

Result:

image

notiv-nt avatar Feb 08 '19 23:02 notiv-nt

no one will download the entire archive from github, in order to look at examples

notiv-nt avatar Feb 08 '19 23:02 notiv-nt

Your awesome, and this is an awesome idea! I did a quick pass and converted the first 6 examples up to vuebars to have codesandboxes. I'll keep at it, and feel free to pull request any future examples you convert and I'll add em asap!

peterlamar avatar Feb 09 '19 20:02 peterlamar

What about:

├─ aggrid/
│   ├── ... ?
│   └── readme.md
├── vuebars/
│   ├── ... ?
│   └── readme.md
└── ...

vuebars/readme.md:

Overview text...

documentation link...

Minimal code example (for copy-paste):

main.js

import Vue from 'vue';
import VueBars from 'vuebars';

Vue(VueBars);

App.vue

<bars :data="[]" :gradient="[color, color]">

Examples:

documentation link, codepen link, codesandbox link ...

notiv-nt avatar Feb 09 '19 20:02 notiv-nt

For in-browser usage:

<script src=./node_modules/vuebars/dist/vue-bars.js></script>

For vue cli:

// npm i vuebars
import VueBars from 'vuebars';

Vue(VueBars);

notiv-nt avatar Feb 09 '19 20:02 notiv-nt

And again.

codesandbox > vue template > add dependencies

notiv-nt avatar Feb 09 '19 20:02 notiv-nt

I think thats great! Want to do one example in a pull request and I'll follow the pattern?

peterlamar avatar Feb 09 '19 21:02 peterlamar

Or post a github repo that you have in mind to mimic

peterlamar avatar Feb 09 '19 22:02 peterlamar

ok, tomorrow

notiv-nt avatar Feb 09 '19 22:02 notiv-nt

Your PR Looks great, merged it in! I'll start bringing up the other examples to whatever spec we finalize on.

  1. What linter did you use for the html file? I have been trying to decide on one and Atom beautify is what I have been using, it seems to fight with eslint and some of the other ones I have been experimenting with.

  2. I'll take a look at github pages, its a fair point.

  3. What were you getting at with the tree view? Was that for the home readme to give an overview of all the files for all the examples or per project?

├─ aggrid/ │ ├── ... ? │ └── readme.md ├── vuebars/ │ ├── ... ? │ └── readme.md └── ...

peterlamar avatar Feb 10 '19 18:02 peterlamar

  1. there are no linters that format html well
  2. just example for folder structure

notiv-nt avatar Feb 10 '19 18:02 notiv-nt

Turned on github pages, def a better idea than linking the index.html file.

  1. Thanks for the reassurance, I was thinking it was just me.

  2. So for folder structure, are you proposing a subfolder within each folder?

peterlamar avatar Feb 10 '19 18:02 peterlamar

no, folder for each package

notiv-nt avatar Feb 10 '19 19:02 notiv-nt

or directory for each type of package, ex. for charts: /chart/readme.md with examples with different packages for charts

notiv-nt avatar Feb 10 '19 19:02 notiv-nt

let's say i am a developer. And I want to add a chart to my site. I google: 'vue charts'. And what do I get? At least https://github.com/vuejs/awesome-vue#charts, But these are just package links. and I need to go into each and see the demo. But what if there was a page where there are all the options for all the charts that I can add?

notiv-nt avatar Feb 10 '19 19:02 notiv-nt

That's a good point, I hate roaming through all those pages. Half of the demos don't work. The worst is when you think a chart is perfect just to figure out that there is some slight bug in the implementation.

peterlamar avatar Feb 10 '19 19:02 peterlamar

I'll play with some ideas, but simply a page that showed working demos of charts would def be useful.

peterlamar avatar Feb 10 '19 19:02 peterlamar

Ok sir, all examples have a readme with codepens and github pages hosting when applicable. Also, charts are in their own section in the main readme. Any other thoughts?

Also, I do like your idea with the charts and am still considering big ideas around it

peterlamar avatar Feb 16 '19 21:02 peterlamar

https://github.com/peterlamar/vue-examples/tree/master/chart

that's nice, but it's not real-world example. I think (and hope) that no one will write

notiv-nt avatar Feb 16 '19 21:02 notiv-nt

I already have a huge vue app. And i want to add some charts to it. And... you offer write

notiv-nt avatar Feb 16 '19 21:02 notiv-nt

+ what about lazy-load this ?

I will have this chart on one page out of 30, and I do not want to download it unless it will be used

notiv-nt avatar Feb 16 '19 21:02 notiv-nt

Ok, ill do vue cli versions of those charts. Thanks for your perspective

peterlamar avatar Feb 17 '19 20:02 peterlamar

Is what you did for your example what you are looking for? https://codesandbox.io/s/74prz8jp7j

peterlamar avatar Feb 18 '19 14:02 peterlamar

no

notiv-nt avatar Feb 21 '19 12:02 notiv-nt

Ok, if you have time gimme another pull request. Otherwise I'll give it a shot

peterlamar avatar Feb 22 '19 20:02 peterlamar

Given the time that past, it would prob be best if this was in a new repo for vue cli charts. This repo can stay a time capsule for learning vue from the ground up for those with no front end experience

peterlamar avatar Sep 16 '19 13:09 peterlamar

@peterlamar this seems to be useful to someone image

notiv-nt avatar Sep 16 '19 13:09 notiv-nt

Your still around! :) Ok, I'll reopen

peterlamar avatar Sep 16 '19 15:09 peterlamar

@peterlamar email notifications I do not use this repository, I have nothing to learn from it

notiv-nt avatar Sep 16 '19 15:09 notiv-nt