I should peep this
This is an article to help you learn how to create the beginnings of a package like create-turbo
or create-react-app
that help you begin a project by scaffolding out the needed files.
inspired by/learned in part from.
- Create a Bin file.
#! /usr/bin/env node
- package.json
- Test locally with
npm i -g
- Run with
npx package-name
- publish with npm account
npm login
npm publish
"bin": {
"multiply": "bin/index.js"
},
Scoped package.
- package.json
- publishConfig.
{
"name": "@<YOUR_GITHUB_USERNAME>/<YOUR_PACKAGE_NAME>",
...
}
{
...
"publishConfig": {
"access": "public"
}
}