Catalog npm
PACKAGE EXPLORERView in registry

@0x-jerry/x

npm

Some useful command for myself.

Versions collected52
Direct dependencies23From release 2.13.2
Last observed20 Oct, 22:17 UTC

README

Current package documentation

X

Some useful command for myself.

Install

pnpm i -g @0x-jerry/x

Run task xr

xr command can auto detect tasks in package.json/scripts, deno.json/tasks, and run it. you can also append any parameters.

Example: In a node project with pnpm-lock.yaml. And package.json has a script "test": "vitest run"

xr test test/*.ts
# equals
vitest run test/*.ts

# you can also execute binary file in `node_modules/.bin` folder.
xr vite --port 4004

Example: In a deno project with deno.json or deno.jsonc. And have a task "dev": "deno run -A main.ts"

xr dev
# equals
deno run -A main.ts

xr can execute js/ts file directly, also support import any string/yaml/jsonc file directly with import attribute.

Example:

script.ts

const count: number = 3;
console.log(count)

import textData from './test.txt' with { type: 'text' }
console.log(textData) // => typeof textData === 'string'

import yamlData from './test.yaml' with { type: 'yaml' }
console.log(yamlData) // => typeof yamlData === 'object'

import jsoncData from './test.jsonc' with { type: 'jsonc' }
console.log(jsoncData) // => typeof jsoncData === 'object'

import sqlStr from './files/test.sql' with { type: 'text' }
console.log(sqlStr) // => typeof sqlStr === 'string'

Execute it:

xr ./script.ts

Dependency Manager xn

xn command can install modules by detect the correct tool automatically, it detects lockfile to decide which dependency manager tool should be used.

Example: install packages in a node project with pnpm-lock.yaml

xn i lodash-es
# equals
pnpm i lodash-es

xn i lodash-es -D
# equals
pnpm i lodash-es -D

# -t/--types option support install @types/xx package in one command.
xn i lodash-es --types
# equals
pnpm i lodash-es && pnpm i @types/lodash-es -D

Example: remove packages in a node project with pnpm-lock.yaml

xn rm lodash-es
# equals
pnpm uninstall lodash-es

xn rm lodash-es -D
# equals
pnpm uninstall lodash-es -D

# -t/--types option support remove @types/xx package in one command.
xn rm lodash-es --types
# equals
pnpm uninstall lodash-es @types/lodash-es

xn also support rust project.

Example: in a rust project with Cargo.toml

xn i log
# equals
cargo add log

xn rm log
# equals
cargo remove log

Command Completions

This feature only support zsh.

Add those code to ~/.zshrc

source <(xr completion zsh)
Invoke-Expression (xr complete powershell | Out-String)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 52

Collected releases
VersionPublishedDirect dependenciesOpen version
2.13.2Registry latest12 Oct 202623
2.13.117 Jul 202624
2.13.017 Jul 202624
2.12.916 Mar 202624
2.12.812 Mar 202624
2.12.712 Mar 202624
2.12.626 Feb 202624
2.12.519 Nov 202524
2.12.425 Sept 202524
2.12.310 Sept 202524
2.12.29 Sept 202524
2.12.19 Sept 202524
2.12.09 Sept 202524
2.11.08 Sept 202524
2.10.15 Sept 202524
2.10.05 Sept 202524
2.9.34 Sept 202524
2.9.24 Sept 202524
2.9.14 Sept 202524
2.9.04 Sept 202524

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0x-jerry/x

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:17 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c46fabdadbc54a0799e636ddbe5fb80f27200ca0672bf58338055153e6de3ff7