npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-cli-ghpages

v1.0.0

Published

GitHub pages for vue-cli users. Publish to gh-pages branch on GitHub. The Single-Page App Hack for GitHub Pages.

Downloads

14

Readme

vue-cli-ghpages

npm version David Percentage of issues still open PR license

NPM

Publish to any gh-pages branch on GitHub. The Single-Page App Hack for GitHub Pages.

A clean way of deploying vue-cli apps to github pages.

Made for vue-cli users.

Made on top of tschaub/gh-pages.

Inspired by angular-cli-ghpages and spa-github-pages.

Quick start

Quickly understand what vue-cli-ghpages has done.

Installation

This command has the following prerequisites:

  • Node.js 6.x
  • Git 1.7.6 or higher
  • optional: Vue project created via vue-cli

To install the command once globally run the following:

$ npm install -g vue-cli-ghpages

Usage

Execute vue-cli-ghpages in order to deploy the project with a build from dist folder.

Note: you have to create the dist folder in before (e.g. npm run build)

Usage:

$ npm run build
$ vue-cli-ghpages [OPTIONS]

there is also a shorter vcg command available

$ npm run build
$ vcg [OPTIONS]

Tip: If you want to push to gh-pages on the same repository with your default credentials, then just enter vcg without any options.

Options

--help

  • Example: vcg --help

Output usage information.

--version

  • Example: vcg --version

Output the version number.

--message

  • [optional]
  • Default: Vcg: Update live demo
  • Example: vcg --message="Update live demo"

The commit message, must be wrapped in quotes.

--branch

  • [optional]
  • Default: gh-pages
  • Example: vcg --branch=other-branch

The name of the branch you'll be pushing to. The default uses GitHub's gh-pages branch, but this can be configured to push to any branch on any remote.

--name & --email

  • [optional]
  • Default: value of git config user.name and git config user.email
  • Example: vcg --name="Displayed Username" [email protected]

If you are running the command in a repository without a user.name or user.email git config properties (or on a machine without these global config properties), you must provide user info before git allows you to commit. In this case provide both name and email string values to identify the committer.

--repo

  • [optional]
  • Default: url of the origin remote of the current dir (assumes a git repository)
  • Example: vcg --repo=https://example.com/other/repo.git

By default, gh-pages assumes that the current working directory is a git repository, and that you want to push changes to the origin remote. If instead your files are not in a git repository, or if you want to push to another repository, you can provide the repository URL in the repo option.

--dir

  • [optional]
  • Default: dist

Directory for all published sources, relative to the project-root. Most probably no change is required here. This option can be used to deploy completely different folders, which are not related at all to Vue.

--CNAME

  • [optional]
  • Default: ''
  • Example: vcg --CNAME=example.io

Set up a custom domain. see GitHub Pages instructions for setting up a custom domain.

--pre-deploy*

  • [optional]
  • Default: undefined
  • Example: vcg --pre-deploy

Take care the flag. Upcoming... * Check the environment and configuration. Run through without publishing.

Why vue-cli-ghpages?

If you’re getting started with Vue, use vue-cli to scaffolding Vue.js projects. Then, host Vue app(single page apps) with github pages.

  • You don’t need to install or configure tools like gh-pages.

  • You don’t need to waste time Hacking for GitHub Pages.

  • You don’t even need to learning git.

They are preconfigured and hidden so that you can focus on your code.

Just run vcg, and you’re good to go.

Why it's necessary?

GitHub Pages doesn't natively support single page apps. When there is a fresh page load for a url like example.tld/foo, where /foo is a frontend route, the GitHub Pages server returns 404 because it knows nothing of /foo. we need Hacking for GitHub Pages.

Learn more:

My hack.json | How it works? | Usage instructions | Publish files to a gh-pages branch on GitHub

FAQ

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Thanks

angular-cli-ghpages

spa-github-pages

gh-pages

License

MIT Copyright (c) 2017 Jeneser