package.json: update

This commit is contained in:
Rico Sta. Cruz 2017-08-30 19:00:41 +08:00
parent eae4ced525
commit 489b520729
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
3 changed files with 66 additions and 43 deletions

View File

@ -29,7 +29,7 @@ Jekyll
* jekyll-sitemap * jekyll-sitemap
{: .-four-column} {: .-four-column}
As of github-pages v156. As of github-pages v156. For an updated list, see: [Dependency versions](https://pages.github.com/versions/) _(pages.github.com)_
GitHub Metadata GitHub Metadata
--------------- ---------------

View File

@ -2,19 +2,21 @@
title: package.json title: package.json
category: Node.js category: Node.js
layout: 2017/sheet layout: 2017/sheet
redirect_from: prism_languages: [json]
- /package.html updated: 201708.30
- /package weight: -3
--- ---
### Basic ### Basic
```json
{ {
"name": "expo", "name": "expo",
"description": "", "description": "My package",
"keywords": [""],
"author": "Rico Sta. Cruz <hi@ricostacruz.com>",
"version": "0.1.0", "version": "0.1.0",
"license": "MIT",
"keywords": ["http", "server"],
"author": "Rico Sta. Cruz <hi@ricostacruz.com>",
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"
}, },
@ -26,11 +28,15 @@ redirect_from:
"type": "git", "type": "git",
"url": "https://github.com/rstacruz/___.git" "url": "https://github.com/rstacruz/___.git"
}, },
"license": "MIT"
} }
```
{: data-line="2,3,4,5"}
Highlighted lines are required.
### Dependencies ### Dependencies
```json
"dependencies": { "dependencies": {
"colors": "*", "colors": "*",
"flatiron": "0.1.x", "flatiron": "0.1.x",
@ -38,12 +44,19 @@ redirect_from:
"plates": "https://github.com/user/project/tarball/branch", "plates": "https://github.com/user/project/tarball/branch",
"stuff": "git://github.com/user/project.git#commit-ish" "stuff": "git://github.com/user/project.git#commit-ish"
}, },
"devDependencies": { ```
...
}, ```json
"devDependencies": { ··· },
"peerDependencies": { ··· },
"optionalDependencies": { ··· },
```
See [Semver cheatsheet](./semver) for explanation of version ranges.
### Scripts ### Scripts
```json
"scripts": { "scripts": {
"start": "node ./bin/xxx", /* npm start */ "start": "node ./bin/xxx", /* npm start */
"test": "vows --spec --isolate", /* npm test */ "test": "vows --spec --isolate", /* npm test */
@ -51,15 +64,18 @@ redirect_from:
"prepublish": "grunt build", /* after 'npm install' and before 'npm "prepublish": "grunt build", /* after 'npm install' and before 'npm
publish' */ publish' */
} }
```
### Misc ### Misc
```json
"private": true, "private": true,
"preferGlobal": true "preferGlobal": true
```
### Config ### Config
```js ```json
{ {
"config": { "config": {
"foobar": "hello" "foobar": "hello"
@ -70,6 +86,8 @@ redirect_from:
} }
``` ```
Keys in `config` are exposed as env vars to scripts.
## References ## References
{: .-one-column} {: .-one-column}

5
package.md Normal file
View File

@ -0,0 +1,5 @@
---
title: package.json
category: Hidden
redirect_to: /package.json
---