27 comments

[ 2.6 ms ] story [ 75.6 ms ] thread
(comment deleted)
So you just build your app and pushes the "binary" output on Github Pages? It would be better to push the output dir to another branch folder and force push it when you update.
Yeah, creating an orphan “gh-pages” branch is what I always do. Repositories that include build output in the main branch make me rather quite upset.

Your additional point about force pushing is a good one also. While I’ve been using separate branch I’ve still been commiting each new build as a new commit. But overwriting the initial commit makes a lot more sense actually.

You could just use gitlab: https://gitlab.com/pages?page=1

Much better imo

can you quantify how it is better? I can't find any details on what differentiates them
The main difference in my experience is the fact GitLab CI is very flexible. In this case, it would be trivial to use a node docker container and automatically build static assets on the server instead of doing it locally and polluting the repo.
You don't necessarily need the whole server-side dance:

https://jsfiddle.net/chrisvfritz/50wL7mdz/

I find developing without a server side build process much more lightweight and enjoyable.

I'm currently batling with this and components inside components, not sure how to do it nor where to find info for it. if anyone as any guide would be very much appreciated.
In a lot of cases you really don't want a server at that layer of the stack anyways, when you could be serving your site from a CDN/"edge" that's built for low-latency to end users, cost-optimized for transfer and not having to play all of the games that scaling yet another layer brings. I'm willing to believe that some people really need server side rendering but it'd a hard sell to convince me that the majority of people chasing SSR really need it, or that they're better off for it.
Any suggestions for running a Vue.js application as a local set of files, without running a web server? My use case is slightly more obscure than this, but imagine something like a local, off-network kiosk interface.
I've run vue apps just as local files. you'll run into cors issues with certain resources, but other than that it works pretty well.
I guess this is an awful way to do it, but I heard stories about people that got away with a script that did and find and replace on build files to set some crazy paths.
You mean running production frontend-only apps?

You can just open "index.html" in your browser and it will run fine, as longs as the paths inside your files are relative.

You might have to reconfigure your bundler. If you're using Parcel, just pass `--public-url .` as a command line option when building. For Webpack use the publicPath configuration, etc.

But remember that pages accessed via file:/// have limited permissions: you can't use localStorage, access some sites using CORS, can't capture audio/video, etc. But if you're not using these things then it's fine.

I have been using Vue.js for a while and I'm really impressed by it. During development using `npm run serve` and having it automatically rebuild whenever a file is added or changes is great and then baking it out for static storage using `npm run build` is a great follow up.
yes, have you been using vue-cli? that's what makes prototyping new ideas so easy it's a no brainer!
None of this is specific to Vue. If you're using the Vue-CLI it's powered by Webpack which is the same build/development tool used by most major frameworks.
Vue seems very similar to react[1]. Anyone know why vue is seeing a big swing in adoption when we already have react? Maybe because it's built into laravel[2]? Some other reason?

1. https://medium.com/javascript-in-plain-english/i-created-the...

2. https://laravel.com/docs/5.8/frontend

Because the work is done mainly by a small team instead of backed by a company that we are all starting to really distrust?

Also, excellent docs.

We have used Vue at my company for almost three years now. Love it.

I don’t see the point to bother with react, when I’ve been able to do so much with vue.js
How do you manage subroutes and direct deeplink to a subpage?