DEV Community

Arnaldo Gabriel
Arnaldo Gabriel

Posted on

3 2

NPM Package Creation - µGuide

Note to self.

How to Publish

  1. Create an NPM account
  2. Create GitHub repo
  3. Clone repo with git clone <url>
  4. Inside the repo run: npm init
  5. Fill the required fields
  6. Push to Github: git push origin master
  7. Publish publicly: npm publish

Basic Commands

  • To publish a new version of the package: npm version 1.0.0 && npm publish
  • To see the current profile: npm profile get
  • To change a property: npm profile set <property> <value>
  • To get current local version: npm version
  • To update a specific package: npm install package@latest
  • To update if the version change is minor: npm update package

Whitelisting Specific Directories

This is useful to minimize the size of the package by not including unnecessary files present in the repo.

    {
      "name": "package-name",
      "main": "./lib/index.js",
      "files": [
        "/allowed-directory"
      ]
    }

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more