sassdoc icon indicating copy to clipboard operation
sassdoc copied to clipboard

Use read-package-json (npm) to read package.json

Open MathiasSM opened this issue 8 years ago • 1 comments

I think the package.json is being required directly, so that means stuff npm does automatically like parsing people objects like:

{
  "author": "Mathias San Miguel <[email protected]> (mathias.example.com)"
}

into

{
  "author": {
    "name": "Mathias San Miguel",
    "email": "[email protected]",
    "url": "mathias.example.com"
  }
}

is not happening, even when it'd be more intuitive to make your package.json parsing follow the standard npm parsing, so that theme developer could use the file as it is (like it's supposed to).

MathiasSM avatar Sep 14 '17 19:09 MathiasSM

My bad, it's the npm package normalize-package-data that specifically does those things (that package is required and used by read-package-json, so what I said still applies!)

MathiasSM avatar Sep 14 '17 19:09 MathiasSM