Skip to content

Commit

Permalink
Refresh readme (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzkaczor authored Nov 5, 2023
1 parent 6fdb140 commit 5278950
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ bun test
- `common/cli` - this is where cli args are parsed. We use a combination of clippy and hand written pre-processing to deal with some edge cases,
- `common/fs` - minimal fs abstraction, used to make writing unit tests possible,
- `common/execute` - minimal spawn abstraction, used to make writing unit tests possible,
- [e2e tests](./test-e2e/README.md)

## Changelog management

We use [changesets](https://github.com/changesets/changesets) to manage changes. When you're done with a **user facing change**, run `ny changeset add` in the root of the project to kick off a CLI for adding a new changeset. Describe your change and commit the resulting file.
File renamed without changes.
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<p align="center">
<img src="assets/hero.png">
<h1 align="center">🗽 NY</h1>
<h3 align="center">Proxy Package Manager for JavaScript</h3>
<h3 align="center">Chooses the right package manager based on the lockfile.</h3>
<p align="center"><i><strong>n</strong></i>ode • <i><strong>y</strong></i>arn • pnpm</p>
<h2 align="center">🗽 NY - Fast, Proxy Package Manager for JavaScript</h2>
<h4 align="center">Chooses the right package manager and runtime based on the lockfile</h3>
<p align="center"><i><strong>n</strong></i>ode • <i><strong>y</strong></i>arn • pnpm • bun</p>
</p>

## Features

- <strong>Universal</strong> - Picks the right package manager for you based on the lockfile in your folder. Easy peasy!
- <strong>Universal</strong> - Picks the right package manager and runtime based on the lockfile. `npm`, `bun`, `pnpm`, `yarn` - we got you covered!
- <strong>Versatile</strong> - Handles the basics like installing all your dependencies, adding new packages, and kicking off scripts.
- <strong>Speedy</strong> - Crafted in Rust to give you a quick ride. No extra node processes to slow you down!
- <strong>Speedy</strong> - Crafted in Rust to give you a quick ride. When running scripts, it's actually faster than using PMs directly!
- <strong>TypeScript-Ready</strong> - Adding a new dependency? Don't worry! It'll fetch any missing `@types` packages for you if needed.

## Usage
Expand All @@ -23,10 +22,6 @@ ny # installs all dependencies eq. to: yarn install
ny add zod # installs zod package eq. to: yarn add zod
```

```sh
ny add react # installs react package and attempts to automatically install missing typings (@types/react)
```

```sh
ny test # executes package.json's test script eq. to: yarn test
```
Expand All @@ -47,13 +42,21 @@ curl -fsSL https://raw.githubusercontent.com/krzkaczor/ny/main/install.sh | bash

Get the newest release from [releases page](https://github.com/krzkaczor/ny/releases).

## CLI

For full documentation run `ny --help`.

- `ny install` - trigger installing all dependencies. Aliased to: `ny`.
- `ny add package` - add new dependency, supports flags like `--dev` and `--workspace-root`. Will automatically install missing TypeScript `@types` packages.
- `ny run task` - runs a task with a given name or resolves a JS file in `node_modules/bin`. Will use node.js to execute it by default unless bun lockfile is present. Aliased to: `ny task`.

## Dive deeper

### Motivation

In the world of JavaScript, there's a fun mix of package managers - npm, yarn, pnpm. Pick your poison. Programmers often switch between projects that use different PMs multiple times a day. Did you just typed `yarn` when the project uses `npm`? Well too bad -- you've wasted couple of seconds again. With 🗽NY, there's no guesswork. Just type `ny` and it picks the right manager for you. Handy, right?
In the world of JavaScript, there's a fun mix of package managers - npm, yarn, pnpm. Pick your poison. With a rise of alternative runtimes like Bun or Deno the problem only gets worse. Programmers often switch between projects that use different PMs multiple times a day. Did you just typed `npm` when the project uses `bun`? Well too bad -- you've wasted couple of seconds again. With 🗽NY, there's no guesswork. Just type `ny` and it picks the right package manager and runtime for you. Handy, right?

And here's the kicker: 🗽NY is snappier! Especially when running package scripts (like when you type `yarn test`). It's written in Rust and it zips through tasks about ~200ms faster by skipping spawning node process just to parse package.json. Sweet, huh?
And here's the kicker: 🗽NY is faster! Especially when running package scripts (like when you type `yarn test`). It's written in Rust and it zips through tasks about ~200ms faster by avoiding spawning node processes just to parse `package.json`. Sweet, huh?

Main sources of inspiration were [antfu/ni](https://github.com/antfu/ni) (but it's written in JS) and [egoist/dum](https://github.com/egoist/dum) (but it's only a task runner).

Expand All @@ -67,7 +70,7 @@ All contributions are welcomed! [Read contributing guide for more](./contributin

### Logo

Logo should depict a statue of liberty (a symbol of <strong>N</strong>ew <strong>Y</strong>ork ;) ) holding tools. Midjourney prompt goes something like: `simple mascot, statue of liberty with tools, pixelart style`. Later [vectorizer.ai](https://vectorizer.ai) was used to get SVG out of bitmap.
Logo should depict a statue of liberty (a symbol of <strong>N</strong>ew <strong>Y</strong>ork ;) ) holding tools. Midjourney prompt goes something like: `simple mascot, statue of liberty holding tools, pixelart style`. Later [vectorizer.ai](https://vectorizer.ai) was used to get SVG out of bitmap.

I know it's not perfect and if you figure out a better prompt let me know!

Expand Down
Binary file modified assets/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5278950

Please sign in to comment.