release a Node.js module on NPM

Being a complete beginner in creating npm packages using typescript2 and angular2, I find myself in need of creating an npm package and publishing it on our company's private repository.

I've managed to generate files like d.ts and .js. But how do I go about packaging the package and uploading it to my npm repository?

You can access the repository here.

In addition, I've successfully logged into our private npm registry:

#npm --registry http://private.npm-registry.com/npm/npm_unstable login

Now, I understand that I need to execute something like npm publish, but I'm unsure what exactly needs to be included in the package (perhaps the content of the ./dist folder)?

Answer №2

If you're interested, check out NPMTS at https://www.npmjs.com/package/npmts

A simple approach involves utilizing the files array in your package.json to specifically publish only the dist folder.

Best regards

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What sets apart running npm dedupe in npm2 compared to utilizing npm3?

With npm3, the goal is to install dependencies in a more flat manner. However, in npm2 we already have the npm dedupe command which also aims to flatten dependencies. If I am already using npm dedupe with npm2, are there any benefits to upgrading to npm3 ...

One-of-a-kind npm module for typescript

As part of my project, I am enhancing an existing library to make it compatible with TypeScript. To showcase this modification, I have condensed it into a succinct Minimal working example The specified requirements To ensure backward compatibility, the li ...

Retrieve information for the designated page exclusively

When retrieving data from the backend using a service, I encounter an issue where the system may slow down if 2000 records are returned in one request. To address this, I would like to display only 10 records per page and fetch the next 10 records with eac ...

Angular: bypassSecurityTrustHtml sanitizer does not render the attribute (click)

I'm facing an issue where a button I rendered is not executing the alertWindow function when clicked. Can anyone help?: app.component.ts: import { Component, ElementRef, OnInit, ViewEncapsulation } from '@angular/core'; import ...

Is it possible that using npm link could be the root cause of the "module not

As I delve into understanding how to utilize TypeScript modules in plain JavaScript projects, it appears that I am facing a limitation when it comes to using npm linked modules. Specifically, I can successfully use a module that is npm-linked, such as &apo ...

Tips on refreshing a view in react as data updates

Currently, I am delving into learning a variety of subjects such as Typescript, Express, and my newfound interests in REACT and RXJS. To aid in my studies, I created a Quick-List on Github, but encountered a question... "How can the view in React be upda ...

Encountering difficulties when attempting to load a module with the "js" extension in a TypeScript environment

When making a GET request with Systemjs, the extension .js is not being added to the URL. These are my TypeScript Classes customer.ts import {Address} from "./Address"; export class Customer { private _customerName: string = ""; public Customer ...

Angular 13 implementation of a double-loop structure for fetching data from an API

I'm facing an issue with retrieving specific data fields label and svm from a JSON file. The desired fields are nested inside PORTFOLIO > REGROUPEMENT > ELEMENT. You can access the JSON file here. img(1) I've attempted to display the dat ...

The npm installation no longer resolves changes from a URL and sets it to false

The Issue Whenever I pull my team's code and execute npm install, the resolved property of certain items in package-lock.json is altered from a URL to false. For example: "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/deb ...

The "mkdir" command is malfunctioning in an npm script on Linux, whereas it is functioning properly

My "prebuild" script is designed to create a specific folder structure: mkdir -p dist/{server,shared,client/{css,js,fonts,img}} The desired output should be: dist server shared client css js fonts img When I ...

Ionic 3 Local Notification spamming a particular page with excessive pushes

Recently starting out with Ionic, I encountered an issue while developing a basic app that should display a specific page by opening a Local Notification. The problem arises when I create multiple notifications – after clicking on the second notification ...

What is the proper way to transfer data from a file using npm's request package?

I'm currently utilizing npm's request module to interact with an API. The API specifications require that data be sent through a file using the @site.json notation when making a CURL request. For example: curl -X POST -d @site.json 'https ...

Data from the server isn't loading in Angular2

I have successfully developed a basic Java app using REST that returns a string value when accessed through a REST client. However, I am now facing an issue in fetching the string value using an Http REST client in Angular2. I have set up a service to retr ...

Several mat-radio-button options chosen within mat-radio-group

`<mat-radio-group [ngClass]="cssForGroup" name="test"> <mat-radio-button *ngFor="let option of options | filter:searchText" class="cssForRow" [value]="option" ...

After installing Node.js on my Windows system, I encountered an issue where I was unable to obtain the npm version

'RUN "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not identified as an internal or external command, executable program, or bat ...

Is the latest stable Node version incompatible with npm?

Having recently delved into the world of node/npm, I decided to upgrade my node version (although the reason escapes me now). However, in my attempt to install a logging solution (which, as it turns out, is not compatible with version 0.10), I encountered ...

Angular's AsyncValidatorFn is triggered by the onblur event and does not work with keypress events

I'm currently working with the latest version of Angular and I'm attempting to implement a custom validation for checking a code through a RestAPI. The example below is functional, but it doesn't trigger on keypress events; it only activates ...

React: When trying to use create-react-app, the process fails and displays an error message stating "libnpx module not found"

Operating System: Ubuntu IDE: VS Code The command npx create-react-app was running smoothly until I encountered a suggestion that stated Create React App requires Node 14 or higher. In an attempt to update my node version, I used the following commands: ...

Jodit-React: Addressing the Placeholder Problem

I've recently incorporated Jodit-react into my react-typescript project, but I encountered an error when adding the config property. The error message stated that it "Has no property common with type." Unfortunately, I'm unsure why this is happe ...

Typescript: Potential null object error when defining a method

I recently encountered an error message stating "Object is possibly null" while working on the changePageSize method in book-store.component.html. It seems like I need to initialize the object within the class, but I'm not familiar with how to do that ...