shama / napa

:wine_glass: A helper for installing stuff without a package.json with npm.
MIT License
412 stars 34 forks source link

napa take wrong package name #28

Closed nrako closed 8 years ago

nrako commented 9 years ago

napa doesn't seems to use the correct package name when using the following format:

{
  "scripts": {
    "install": "napa"
  },
  "napa": {
    "srcpubnub": "pubnub/javascript#3.7.2"
  }
}

napa create node_modules/srcpubnub/package.json with this content:

{
  "name": "pubnub",
  "version": "0.0.0",
  "description": "",
  "_napaResolved": "https://github.com/pubnub/javascript/archive/3.7.2.tar.gz"
}

While I believe the package name should be srcpubnub.

Else npm shrinkwrap will complain about it

❯ npm shrinkwrap
npm ERR! Error: Problems were encountered
npm ERR! Please correct and try again.
npm ERR! invalid: pubnub@0.0.0 /Users/nrako/project...name/node_modules/srcpubnub

Manually editing the package name, fix that. Of course srcpubnub has to be added to the optionalDependencies.

Am I correct? The package name should reflect the folder name/napa config, right?

caseyWebb commented 8 years ago

Appears to have been fixed.. closing.