0.0.4 • Published 1 month ago

@samuraijane/pluralit v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@samuraijane/pluralit

To test locally

Create two directories that are siblings to each other and link them together. Linking mimics npm i to create a node_modules directory. pluralit can be consumed with either import or require syntax; however, when testing locally in Node, the file extension for each must be .mjs or .ts, respectively.

  1. Sibling #1 – pluralit/
git clone https://github.com/samuraijane/pluralit.git
cd pluralit
npm link
  1. Sibling #2 – consuming/
mkdir consuming
cd !$

# for `import` syntax
touch index.mjs

# for `require` syntax
touch index.ts

npm link @samuraijane/pluralit
  1. Populate the index file and save
// index.mjs
import { pluralit } from "@samuraijane/pluralit";
// or if using index.ts
const { pluralit } = requre("@samuraijane/pluralit");

console.log(pluralit("book"));
  1. Run the code
node index.ts

# or

node index.mjs
  1. To unlink, follow the steps below
cd pluralit
npm unlink
cd ../consuming
npm unlink --no-save @samuraijane/pluralit

Built with the help of Matt Pocock

pluralit is not intended to be used in production. It was built while following an excellent tutorial pulished by Matt Pocock. You can also see the notes I made while following his video.

0.0.4

1 month ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago