@startup-engine/shared
v0.0.19
Published
Types shared across our API and client
Downloads
991
Readme
Here's a refined version of your instructions, incorporating the changes you mentioned:
@startup-engine/shared
Pre-requisites
- Ensure that the
.npmrc
file is present at the root of the project. If you don’t have it, runyarn configure
to pull the necessary.npmrc
token for authentication.- Organization Setup: Before publishing for the first time, you must create an organization on NPM if it hasn't been done already. This allows you to use scoped packages (e.g.,
@startup-engine/shared
).
- Organization Setup: Before publishing for the first time, you must create an organization on NPM if it hasn't been done already. This allows you to use scoped packages (e.g.,
Step-by-Step: Setting up a New Shared Library
Create NPM Organization (First-Time Only):
- Go to npmjs.com and create an organization (if not already created).
- Update the
name
field in yourpackage.json
to follow the scoped convention:{ "name": "@startup-engine/shared", "version": "1.0.0", "main": "index.js" }
Step-by-Step: Updating an Existing Shared Library
Implement Changes:
- Make your changes to the shared library. Ensure that any new types, functions, or constants are properly exported in
index.ts
.
- Make your changes to the shared library. Ensure that any new types, functions, or constants are properly exported in
Publish the Package:
- After making the changes, publish the updated package:
yarn publish
- For the first-time publish, explicitly set the package to public:
yarn publish --access public
- After making the changes, publish the updated package:
Update Back-end and Front-end Packages:
- After publishing, update any dependent projects (e.g., back-end and front-end) to use the latest version of the shared package.
References
- For more information, you can check this guide: The 30-Second Guide to Publishing a TypeScript Package to npm
Notes
- First-time publishing will require you to explicitly set the package to public:
yarn publish --access public