Skip to content

net/just-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

just-sync

Sync just and package.json scripts, and installs just as a node_modules binary.

Some tools, like Turborepo, expect package.json scripts. just-sync lets you use justfiles while keeping compatibility.

npm

Installation

npm install -D just-sync
pnpm add -D just-sync
yarn add -D just-sync

Usage

npm just

Your npm scripts will be moved to your justfile, and your justfile recipes will be aliased as npm scripts.

package.json to justfile

Before:

{
  "scripts": {
    "dev": "vite dev",
    "test:unit": "vitest run",
    "build:prod": "NODE_ENV=production vite build"
  }
}

After running npm just:

export PATH := "./node_modules/.bin:" + env_var('PATH')

dev:
    vite dev

test--unit:
    vitest run

build--prod:
    NODE_ENV=production vite build
{
  "scripts": {
    "dev": "just dev",
    "test:unit": "just test--unit",
    "build:prod": "just build--prod"
  }
}

justfile to package.json

Before:

deploy env="staging":
    echo "Deploying to {{env}}"

After running npm just:

{
  "scripts": {
    "deploy": "just deploy"
  }
}

Features

  • Auto-installs just binary as a node_modules binary (no separate install needed)
  • Converts names: test:unittest--unit
  • Handles node_modules/.bin paths automatically
  • Works in monorepos (finds workspace root)
  • Zero configuration

Alternatives

If you just want to install just as a node_modules binary without syncing scripts, see just-install.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published