Comments (5)
Just for giggles, here's the full version of my normalized package.json file:
{
"name": "pkg2",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": {
"name": "Peter deHaan <[email protected]> (http://nodeexamples.com/)",
"url": ""
},
"repository": {
"type": "",
"url": ""
},
"bugs": {
"url": ""
},
"licenses": [
{
"type": "WTFPL"
}
],
"keywords": []
}
And the pre-normalized version was:
{
"name": "pkg2",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Peter deHaan <[email protected]> (http://nodeexamples.com/)",
"license": "WTFPL"
}
from normalize-pkg.
Here, look what I did with Verb: https://github.com/assemble/verb/blob/master/lib/utils/authors.js
I'll move that into a separate repo and use that to parse the author field. It didn't occur to me to do that for some reason. We can also look for an AUTHORS
file and conditionally use the results from that (like if the authors
field is missing and/or to fill in missing data, etc)
from normalize-pkg.
is this technically a bug, or a request to parse the string?
from normalize-pkg.
I think it's a bug as it is currently.
I'm using the shorthand notation to specify a name/email/url (Peter deHaan <[email protected]> (http://nodeexamples.com/)
), but we're currently just treating it as a name.
from normalize-pkg.
The normalized author field is now the string version so it's not expanded into an object.
from normalize-pkg.
Related Issues (12)
- find an API or site that provides JSON for licenses HOT 3
- store common, generic config values HOT 1
- move the CLI into a yeoman generator HOT 1
- Support for repo shorthand syntax HOT 3
- repository normalizer HOT 1
- module, like, goes crazy on empty package.json HOT 5
- Add a trailing newline when rewriting package.json file
- Search for local LICENSE file? HOT 1
- try to extract bug url from repository HOT 5
- try to extract homepage url from repository HOT 6
- Integrate package.json validator output? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from normalize-pkg.