w3resource

Guide to npm-star, stars, start, and stop Commands


In the previous tutorial we showed you how you can perform search operation on the npm registry using npm search, we also showed you how to prepare a package for publishing using the npm shrinkwrap.

In this tutorial, we will show you how to mark your favorite package, view starred packages, start a package and how to stop a package.

Npm-star

The npm star is used to mark your favorite packages.

Synopsis

npm star [<pkg>...]
npm unstar [<pkg>...]

description

if you have interest in a package; you can star it. Starring a package indicates that you have interest in it. This action is taken as a positive way to show that care.

Unstarring a package indicates that you do not have interest or no longer have interest in the package.

This option is a Boolean type option, thus starring a package repeatedly does not have an additional effect.

Npm-stars

This command is used to view the packages that have being marked as favorites.

Synopsis

npm stars [<user>]

description

This command enables you to quickly find all the packages that you have starred. This command can also enable you see the starred packages of another user.

Npm-start

Use the npm start to start a package.

Synopsis

npm start [-- <args>]

Description

This will run an arbitrary command that is specified in the start property of its script object. If there is no start property specified on the scripts object, it runs node server.js

As of the [email protected], you can make use of custom arguments when executing scripts.

Npm-stop

This command is used to stop a package.

Synopsis

npm stop [-- <args>]

Description

This command will run the stop script that is provided by the package.

Previous: Comprehensive Guide to npm-search and npm-shrinkwrap Commands.
Next: Guide to Managing Teams and Testing Packages with npm.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/npm/npm-star-stars-start-and-stop-cli-commands.php