Skip to content

Commit

Permalink
Require Node.js 6
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 25, 2018
1 parent 7eb2f6b commit c5f6837
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 56 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- '10'
- '8'
- '6'
- '4'
80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"name": "read-pkg",
"version": "3.0.0",
"description": "Read a package.json file",
"license": "MIT",
"repository": "sindresorhus/read-pkg",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"json",
"read",
"parse",
"file",
"fs",
"graceful",
"load",
"pkg",
"package",
"normalize"
],
"dependencies": {
"load-json-file": "^4.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^3.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
"name": "read-pkg",
"version": "3.0.0",
"description": "Read a package.json file",
"license": "MIT",
"repository": "sindresorhus/read-pkg",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"json",
"read",
"parse",
"file",
"fs",
"graceful",
"load",
"pkg",
"package",
"normalize"
],
"dependencies": {
"load-json-file": "^5.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^3.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
}
16 changes: 3 additions & 13 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,10 @@ $ npm install read-pkg
```js
const readPkg = require('read-pkg');

readPkg().then(pkg => {
console.log(pkg);
(async () => {
console.log( await readPkg());
//=> {name: 'read-pkg', ...}
});

readPkg(__dirname).then(pkg => {
console.log(pkg);
//=> {name: 'read-pkg', ...}
});

readPkg(path.join('unicorn', 'package.json')).then(pkg => {
console.log(pkg);
//=> {name: 'read-pkg', ...}
});
})();
```


Expand Down

0 comments on commit c5f6837

Please sign in to comment.