1.编写模块
exports.sayHello = function(){
return 'Hello World.';
}
保存为hello_freedom.js
2.初始化包描述文件
$ npm init
package.json
{
"name": "hello_freedom",
"version": "0.0.1",
"description": "A hello world package",
"main": "./hello.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"Hello",
"World"
],
"author&