Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo Installation

You can point a dependency at any Git repo (public or private). Yarn will clone it at install time.

{
  "devDependencies": {
    // install from main branch
    "@your-org/cli‑scripts": "git+ssh://git@github.com/your‑org/cli‑scripts.git",

    // or install a specific tag/semver
    "@your-org/eslint‑config": "git+ssh://git@github.com/your‑org/eslint‑config.git#v1.2.3"
  }
}

Versioning is driven by Git tags. If you push v1.2.3 in the repo, then specifying #v1.2.3 will fetch exactly that commit.

If you omit the #…, npm will grab whatever is on the default branch at that moment.

Yarn will attempt to grab the matching semver range resolution, however using npm won't.

Usage in repos

Vite: vite.config.ts

import { defineConfig } from 'vite'
import { config } from '@jalapenolabs/cli/vite'

export default defineConfig({
  ...config
})

Eslint: .eslintrc.cjs

module.exports = {
  extends: ["@jalapenolabs/cli/eslint"]
}

Permission

To let npm or npx clone private GitHub repos, you need credentials:

  1. SSH key

Add your public key to GitHub

Use git+ssh://git@github.com/… URLs

  1. CI / CD In CI, set GITHUB_TOKEN env var

CLI with Npx

You can invoke a Git‑hosted CLI without installing by using yarn:

yarn dlx git+ssh://git@github.com/your‑org/cli‑scripts.git <command> <args>

Aliases

alias jala="yarn dlx git+ssh://git@github.com/your‑org/cli‑scripts.git"
Set-Alias jala "yarn dlx git+ssh://git@github.com/your‑org/cli‑scripts.git"

About

Internal & universal CLI tools across the org

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages