NPM大社区资源共享,大家纷纷上传自己的优秀作品,大家纷纷想瞻仰并使用别人优秀作品,但是只有browers可以读懂js,于是乎node横空出世,充当完美翻译解释官,解读js。于是乎,当瞻仰别人作品的时候,先要获取一个package.jason,npm init这个package carrying a lot of things that relate to the file.
to download the global and local packages is different: the global can be used to the system; the local one is only used to this file.
npm install -g ...
sudo npm install -g ...
- live-server 虚拟server
- lodash 高性能的,一致化,模块化的js实用工具库, works in Node.js,但要注意不要用太太太多的lodash方法,响应会变慢。另外从来不把node_modules 放在GitHub上,需要的只是package.json,因为每一次当你
npm install的时候,package.json里面的dependencies就会被下载回来
npm install 把没有上传到GitHub的modules下载回来。
然后再重新打开文件。