Nodejs npm package. json Chinese document, nodejspackage. json
Introduction
This document provides all necessary configurations in package. json. It must be a real json object instead of a js object.
Many of the actions described in this document are affected by npm-config (7.
Default Value
Npm sets some default values
Simple Steps to publish a vue component to npm: npm steps of the vue component
1.0 create a project
1.1 initialize a projectEnter npm init, and write whatever you need to fill in
Create the src directory and create alert. vue under the src directory
$ Npm init $ mkdir src $ cd src $ touch alert. vue
Last directo
Simple comprehension: The format of XYZCorresponds to: Major version number. minor version number. Revision number, the increment rule for the version number is as follows:Major version number: When you make incompatible API modifications,Minor version number: When you do a backwards-compatible functionality added,Revision number: When you make a backward-compatible problem fix.Suppose we create a new project that will use Express. After running NPM I
Today, when you look at node books, install Express and look inside the bag. There was no thought of such a situation.An error has been made. Later on, it may be that the default installation path for node is modified. You are ready to build a NPM folder under the wrong path.Note that there is a time when the AppData folder cannot be found. Look at the picture:When you see this picture, you should understand. Because this picture is hidden. People are
Cannot find module ' D:\node\nodejs\node_module\bin\npm-cli.js 'Using NODE-V after NVM installs node no problemUsing NPM-V ErrorFinally, the D:\ root directory is installed separatelyRoot:d:\nvmPath:d:\nodejsNo problem.Which tried many methods, environment variable add deleteAnd the original directly installed node Delete, not enough how to finally successfully solve theNVM Install
Original: http://www.sitepoint.com/beginners-guide-node-package-manager/Installing node. jsVerify that your installation is successful.$ node> Console.log (' node is running '); Node is running>. Help.break Sometimes you get stuck, this gets you out.clear Alias for. Break.exit exit the Repl.h ELP Show repl options.load load JS from a file to the REPL session.save Save all evaluated commands in this REPL session to a file>. exitNode has been succes
This is also online search, personally tried, very easy to use.
Mirror use Method (three methods any one can solve the problem, it is recommended to use a third, the configuration will be written dead, the next time the configuration is still in):
1. Through config command, permanent use
NPM Config Set registry https://registry.npm.taobao.org
NPM Info underscore (if the above configuration is correct, this
Brief introduction
This document has the necessary configuration in all Package.json. It must be real json, not a JS object.
Many of the behaviors described in this document are affected by Npm-config (7).
Default value
NPM sets some default values based on the package content.
Copy Code code as follows:
"Scripts": {"Start": "Node Server.js"}
NPM is a module-dependent management tool for node. js. As a tool used by developers, the main solution is to solve problems when developing node. js. As RubyGems the importance of Ruby developers and Maven for Java developers, NPM is self-evident to developers and communities of node.
Recently while there is time to translate NPM guide, using Markdown typesetting, the first translation of many are in accordance with their own understanding of the meaning, there may be a lot of words are not exact place, but still hope to see the people help it.See the process for reference: NPM official documentation.What's (What's NPM?)
Install Npm-g
Installing the module using the NPM commandNPM installs the node. JS module syntax in the following format:$ NPM Install In the following example, we use the NPM command to install the Common node. JS Web Fram
This paper has been transferred from the largest Nodejs community in http://cnodejs.org country. I am the test, very to the force ... Welcome to the node enthusiasts to learn and explore Nodejs development ...
Use NPM to install some packages failed to look over (NPM domestic mirror introduction)
This is also online search, personally tried, very easy to use.
Mirror use Method (three methods any one c
The difference between a directory json and a JS object the Limit version field of the Name Field Name field NPM's rules for version definitions require NPM to have its own module for validation version--node-semver Keywords and description field field requirements: License Field Author field main Field the Script field when to add "run", when you can not add "run". NPM
node. js NPMCommon Commands1.NPM Install module ((1) npm install (with no args, in package dir)1) No parameters, package directory2) Local Installation: By default, all modules declared in Package.json are installed into the Node_modules directory under the current path3) Global Installation:-g,--global parameter, NPM
following package file, we will copy out a directory to put JavaScript files, and stylus The style sheet file we write with Yi into CSS. In this case, it is ideal to run multiple tasks together. can also be implemented, using the delimiter.{" scripts": { "Build-js": "Cp-r src/js/vendor bin/js", "build-css": "Stylus Src/css/all.styl-o bin/css", "Build"
NPM Scripts part 2Objectives and OutcomesIn this exercise you'll learn to build a distribution folder containing the files that can is deployed on a Web server H Osting your project. This distribution folder would is built from your project files using various NPM packages and scripts. At the end of this exercise, you'll be able to:
A folder using the Clean NPM
Https://www.cnblogs.com/goldlong/p/8027997.htmlFirst clarify the relationship between Nodejs and NPM:node. JS is a running environment for JavaScript and is an encapsulation of the Google V8 engine. is a server-side JavaScript interpreter.Include the relationship, Nodejs contains NPM, for example, you install the Nodejs, you open the cmd input npm-v will find out
install a series of necessary programs, such as"Scripts": { "start": "Gulp-s"}If the Package.json file is not set to start, node Server.js will be started directlyNPM Stop Stop ModuleBasic syntaxNPM Stop [--NPM Restart reboot ModuleBasic syntaxNPM restart [--About the syntax of NPM Package.jsonYou can refer to the NPM Package.json Chinese document, which is w
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.