npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

second_nest_g_moura_package

v1.1.8

Published

Starter project for NestJS NPM packages

Downloads

2

Readme

Publish Nest js module on npm.github

first Node module published as an npm package! This project is aimed at providing a template to publish a nest js module to npm.github

Publishing your own package

  1. Modify package.json replace the dollar variable by your own information
{
  "name": "@$github_username/$name_of_package_you_want",
  "version": "1.1.3",
  "description": "Starter project for NestJS NPM packages",
  "main": "dist/test/index.js",
  "publishConfig": {
    "registry": "https://npm.pkg.github.com/@github_username"
  },
  "files": [
    "dist"
  ],
  "scripts": {
    "build": "rimraf dist && tsc",
    "prepublish": "npm run build"
  },
  "keywords": [
    "npm",
    "nestjs",
    "nest-packages"
  ],
  "author": "XXX XXXX",
  "license": "ISC",
  "dependencies": {
    "@nestjs/common": "^8.4.0",
    "@nestjs/mapped-types": "^2.0.2",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^7.5.5"
  },
  "devDependencies": {
    "@types/node": "^18.16.3",
    "rimraf": "^5.0.0",
    "typescript": "^4.9.5"
  }
}

Note

dist/test/index.js
if you are inside src you did change
the name of the module from test to another thing please change it also

Installation on a project

To install the package, you need to have Node.js and npm (Node Package Manager) installed on your machine.

  1. Set up your .npmrc file in your project directory or create one if it doesn't exist.

    Add the following content to the .npmrc file:

@raezon:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=xxx
  1. Install the package using npm:
npm install @raezon/first_nest_package

3 Usage Once the package is installed, you can import and use it in your Node.js project. Here's an example: Import it on your module first

import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { TestModule } from '@raezon/first_nest_package';

@Module({
  imports: [TestModule],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

than use the service

import { Controller, Get } from '@nestjs/common';
import { TestService } from '@raezon/first_nest_package';

@Controller()
export class AppController {
  constructor(private readonly appService: TestService) {}

  @Get()
  getHello(): string {
    return this.appService.findAll();
  }
}

Please refer to the package's documentation for detailed usage instructions and examples.

Contributing We welcome contributions from the community! If you find any issues, have suggestions, or would like to contribute to the development of this package, please follow the guidelines outlined in CONTRIBUTING.md.

Let's embark on this exciting journey of creating and sharing powerful Node.js modules together!

Note: Make sure to replace the placeholder token (xxx) in the .npmrc file with your actual GitHub access token, you can generate that token go to settings/Developer Settings/Personal Access Token/Token(classic)

🚀 Happy coding! 🎉