0% found this document useful (0 votes)
729 views1 page

NPM Handson

The document provides instructions for using npm (node package manager) commands to initialize a package, install dependencies like React, Redux and Mocha, and create a simple Node.js script to log a string to the console. It has the user run npm commands to initialize a package, install dev and runtime dependencies, edit an index.js file to log a string, and add scripts to the package.json to run the index file and output npm version information.

Uploaded by

TECHer YT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
729 views1 page

NPM Handson

The document provides instructions for using npm (node package manager) commands to initialize a package, install dependencies like React, Redux and Mocha, and create a simple Node.js script to log a string to the console. It has the user run npm commands to initialize a package, install dev and runtime dependencies, edit an index.js file to log a string, and add scripts to the package.json to run the index file and output npm version information.

Uploaded by

TECHer YT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

npm 1-

npm init
npm_package
// comment (after this press enter multiple times till the line "is it ok?(yes)"
give yes and press enter)
npm install react
npm install [email protected] --save
npm install redux@4 --save
npm install --save-dev mocha
npm install eslint@6 --save-dev
//comment (run the test)

npm-2

npm init
npm_commands

//comment(after this press enter multiple times till the line "is it ok?(yes)"
give yes and press enter)

m
vi index.js

er as
co
//comment (you are inside index.js press (i) and enter the commands

eH w
[var myVar="node package manager".toUpperCase();
console.log(myVar);]

o.
after entering the above commands press esc ,then (:),then (wq))
rs e
ou urc
vi package.json
//comment (then press (i) and go to tests line press enter and give ',' at end
of the test line and give commands
o

["release":"npm -v && node -v",


aC s

"build":"node index.js"]
v i y re

give same identation for release and build as tests)

npm run release|tee output1.txt


npm run build|tee output.txt
ed d
ar stu
sh is
Th

This study source was downloaded by 100000832806195 from CourseHero.com on 11-03-2021 02:55:33 GMT -05:00

https://www.coursehero.com/file/85760640/npm-handsontxt/
Powered by TCPDF (www.tcpdf.org)

You might also like