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

nvtsk-deploy-gh

v1.0.5

Published

[![NPM](https://nodei.co/npm/nvtsk-deploy-gh.png)](https://www.npmjs.com/package/nvtsk-deploy-gh)

Downloads

4

Readme

Deploy to github-pages

NPM

Node.js Package NPM Version GitHub repo size NPM Unpacked Size

Lint and Test Endpoint Badge


cli application for deploy to github-pages

Usage

Allows to declare build command to build project and require directory name where built project will be. If build is not need it will just use directory with ready build.

Run with dialog:

npx nvtsk-deploy-gh

alt text

Run with command-line arguments

npx nvtsk-deploy-gh --build "npm run build" --dir dist

npm package settings

package.json

  "name": "nvtsk-deploy-gh",
  "version": "1.0.2",
  "main": "./dist/index.js",
  "bin": {
    "nvtsk-deploy-gh": "dist/index.js"
  },
  "types": "./dist/index.d.ts",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/v-nvtsk/otus-jsbasic-dz50-nodejs.git"
  },

Deploy to npmjs with github-action workflow. Distributive entry-point file with bundle is prepended with a line with shebang which runs js file in node.js

#!/usr/bin/env -S node

/*! For license information please see index.js.LICENSE.txt */
(()=>{var e,t,r,n,i={36776:(e,t,r)=>{"use strict";var n=r(2203).Stream,i=r(88179);function o(e,t,r){var o=i(e||function(e){this.
...

Used algorithm

./dist is used here as an example path

  1. Make sure you are on the branch that contains the "dist/" directory you want to publish, or on the branch that is able to build:

  2. Stash the contents of the "dist/" directory:

git add dist
git stash push --keep-index
  1. If the gh-pages branch does not exist, create it:
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Initializing gh-pages branch"
git push -u origin gh-pages
  1. Check out the gh-pages branch
git checkout gh-pages
  1. Apply the stash that contains your "dist/" directory (this will restore the "dist/" directory):
git stash pop
  1. Stage "dist/" directory and move the contents of the "dist/" directory to the root of the repository:
git add dist
git mv -f dist/* .
git reset HEAD -- dist
  1. Add all the new files to the gh-pages branch, commit, and push to GitHub;
git commit -m "deploy"
git push origin gh-pages

GIF made with asciinema

Installation - asciinema docs

asciinema docs

install asciinema

asciinema creates cast files from terminal. agg is instrument to create gifs from cast files.

Visit latest release page, and download a binary appropriate for your system.

For 64-bit x86 system choose a file with x86_64 in the name. For ARMv8 (64-bit, e.g. Apple Silicon) choose a file with aarch64. For ARMv7 (32-bit, e.g. Raspberry Pi) choose a file with arm.

Make it executable and put it somewhere in $PATH:

chmod a+x agg
sudo mv agg /usr/local/bin```

start rec to your_script_name.cast cast-file

asciinema rec ./your_script_name.cast

convert cast-file to gif your_gif_file.gif

agg ./your_script_name.cast ./your_gif_file.gif