• 完整的package.json


    {
    “name”: “Hello World”, //name属性就是你的模块名称
    “version”: “0.0.1”, //version必须可以被npm依赖的一个node-semver模块解析
    “author”: “张三”, //"author"是一个码农
    “description”: “第一个node.js程序”, //一个描述,方便别人了解你的模块作用,搜索的时候也有用。
    “mian”:“index.js”, //main属性指定了程序的主入口文件.
    “keywords”:[“node.js”,“javascript”], //一个字符串数组,方便别人搜索到本模块
    “repository”: { //指定一个代码存放地址,对想要为你的项目贡献代码的人有帮助。
    “type”: “git”,
    “url”: “https://path/to/url”
    },
    “license”:“MIT”, //你应该为你的模块制定一个协议,让用户知道他们有何权限来使用你的模块,以及使用该模块有哪些限制,如BSD-3-Clause 或 MIT之类的协议
    “engines”: {“node”: “0.10.x”},
    “bugs”:{ //填写一个bug提交地址或者一个邮箱,被你的模块坑到的人可以通过这里吐槽
    “url”:“https://github.com/luoshushu”,
    “email”:“bug@example.com”
    },
    “contributors”:[{“name”:“李四”,“email”:“lisi@example.com”}], // "contributors"是一个码农数组。
    “scripts”: { //指定了运行脚本命令的npm命令行缩写。比如:输入npm run start时,所要执行的命令是node index.js。
    “start”: “node index.js”
    },
    “dependencies”: { //指定了项目运行所依赖的模块
    “express”: “latest”,
    “mongoose”: “~3.8.3”,
    “handlebars-runtime”: “~1.0.12”,
    “express3-handlebars”: “~0.5.0”,
    “MD5”: “~1.2.0”
    },
    “devDependencies”: { //指定项目开发所需要的模块
    “bower”: “~1.2.8”,
    “grunt”: “~0.4.1”,
    “grunt-contrib-concat”: “~0.3.0”,
    “grunt-contrib-jshint”: “~0.7.2”,
    “grunt-contrib-uglify”: “~0.2.7”,
    “grunt-contrib-clean”: “~0.5.0”,
    “browserify”: “2.36.1”,
    “grunt-browserify”: “~1.3.0”,
    }
    }

  • 相关阅读:
    Windows 8.1更新变化
    Hibernate Criterion
    HDU 2795 Billboard(宣传栏贴公告,线段树应用)
    解决ccSvcHst.exe CPU占用超50%的问题,及其缘由
    设计模式之解释器模式(Interpreter)摘录
    中国软件开发project师之痛
    【翻译】ExtJS vs AngularJS
    天将降大任于斯人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为,所以动心忍性,增益其所不能
    linux概念之内存分析
    java实现第四届蓝桥杯带分数
  • 原文地址:https://www.cnblogs.com/TGNB/p/11404855.html
Copyright © 2020-2023  润新知