NPM Release-Hands-on teaching you about learning

Source: Internet
Author: User

Register your account First
NPM website Address: https://www.npmjs.com/
NPM website Registration Address: Https://www.npmjs.com/signup
Registration completed, back to our computer. Windows direct cmd to the command line:
Enter the following command and prompt for the username, password, and mailbox, which are all filled out when registering.
Before release, prepare first:

Manually create a folder named Lib, manually create the Index.js, Package.sjon, and typing.d.ts documents, and then start the next step after the creation is complete, adding the appropriate documentation to the inside.
Lib to add your component or the file you want to publish.
For example – with maps:

Or

The next step is the Index.js document.
is to add your module in, with the map: Export * from './lib/datatable/datatable.module ';

Next, configure the Package.json document:

{
' Name ': ' ng-itoo-datatable ',//NOTE: Name yourself
"Version": "1.1.4",//version number
"description": "Add the ability to sort tables by column",
"Main": "Index.js",//Your index document
"Typings": "Typings.d.ts",//Your ytpings.d.ts document
"Scripts": {
"Test": "Echo \" Error:no test specified\ "&& exit 1"
},
"keywords": [
"Itoo",
"DataTable"
],
"Author": "Ledary",//Founder's name
"License": "ISC",//
"_from": "ng-itoo-datatable@1.1.2",
"_resolved": "Http://registry.npm.taobao.org/ng-itoo-datatable/download/ng-itoo-datatable-1.1.2.tgz"
}
Next Configure your Typings.d.ts document: Export {Datatablemodule} from './lib/datatable/datatable.module ';


The above work is ready to be completed and then launched:
Login: NPM Login

After landing: Then press SHIFT + right-click on the item you want to publish: – Select "Open PowerShell window (S)" Here

Entering in Windows PowerShell: NPM Init

The creation is completed and the publication is started. NPM Publish project Name

That's this OK inside. (yes) y
Just enter a Y-carriage directly, and then complete the following steps.

This is successful, warm tip: The success of the release does not mean that it is okay, the first test to see if you can achieve the desired results, reached, is the release of success. ‘

The whole process:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.