Skip to content

Commit

Permalink
don't bury the lead
Browse files Browse the repository at this point in the history
just trying to make sure the value proposition and most common use case is front and center
  • Loading branch information
AJ ONeal authored Feb 5, 2021
1 parent 5b5f446 commit cfc0dd7
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,44 @@
<a href="#license-%EF%B8%8F">License</a>
</h3>

`basetag` creates a `$` symlink in your local `node_modules` so that you can:

😓 Turn _this_:

```js
const balls = require('../../../../baseball/balls'); //
```

🤯 Into _this_:

```js
const balls = require('$/baseball/balls'); //
```

## Usage 🛠

basetag can create a `$` symlink in your local `node_modules` by running:
Install as a **dev** dependency:

```bash
npm install --save-dev basetag
```

Create a `$` symlink in your local `node_modules` by running:

```bash
npx basetag link --hook
```

Upgrade existing `require`s and `import`s to the basetag way:

```bash
npx basetag rebase
```
npx basetag link

Downgrade `require`s and `import`s to the traditional (often messy) way:

```bash
npx basetag rebase
```

---
Expand Down Expand Up @@ -83,6 +115,8 @@ basetag has a few commands that can be run via `npx basetag <command>`
- `link [--absolute] [--hook]` — creates a relative `$` symlink
- `--absolute` creates an absolute symlink rather than relative
- `--hook` sets up basetag to run after every `npm install ...`
- `rebase` - upgrades `require`s and `import`s to use the package-relative `$/`
- `debase` - downgrades `require`s and `import`s to use file-relative `../`s

## Why? ⚡️

Expand Down

0 comments on commit cfc0dd7

Please sign in to comment.