Skip to content
/ napa Public

🍷 A helper for installing stuff without a package.json with npm.

License

Notifications You must be signed in to change notification settings

shama/napa

Repository files navigation

napaBuild StatusAppVeyorCode ClimateDavidjs-standard-style

A helper for installing repos without apackage.jsonwith npm.

NPM

usage

Install withnpm install napa --save-devthen setup your localpackage.jsonscripts as such:

{
"scripts":{
"install":"napa username/repo"
}
}

Now when you runnpm installit willgit clone git://github /username/repo node_modules/repo.

Want to name the package something else?

{
"scripts":{
"install":"napa username/repo:adifferentname"
}
}

Now it will install tonode_modules/adifferentname.

Want to install a package not on github?

{
"scripts":{
"install":"napa git://example /user/repo:privatepackage"
}
}

Multiple packages?

{
"scripts":{
"install":"napa user/repo1:dude user/repo2:rad user/repo3:cool"
}
}

Prefer a more structured approach?

{
"scripts":{
"install":"napa"
},
"napa":{
"foo":"username/repo",
"bar":"git@example:user/repo"
}
}

Looking to just download a tagged release/a branch/a specific commit on github or just a zip or tar.gz url?

{
"scripts":{
"install":"napa"
},
"napa":{
"foo":"username/repo#v1.2.3",
"bar":"username/bar#some-branch",
"baz":"username/baz#347259472813400c7a982690acaa516292a8be40",
"qoo":"https://example /downloads/release.tar.gz",
"fuz":"git+https://yourcompany /repos/project.git",
"goo":"git+ssh://yourcompany /repos/project.git"
}
}

Additional configuration

The application currently supports the following configuration options under anapa-configproperty inpackage.json.

Option name Default value Desctiption
cache true Set tofalseto completely disable package caching
cache-path '<OS temp>/cache' Override default path to a specific location
(relative to the current working directory)
log-level 'info' Set the log level:'silent'/'error'/'warn'/'verbose'/'silly'
{
"napa-config":{
"cache":false,
"cache-path":"../.napa-cache",
"log-level":"error"
}
}

Using Node.js < 4?

Please usenpm install [email protected]and upgrade your Node.js.

Release History

Please viewhttps://github /shama/napa/commits/masterfor history.

  • 2.0.1- Fix path must be a string error (@caseyWebb).
  • 2.0.0- Better detection for GitHub repos, fixes when creating apackage.json,cached git#tagurls now get updated properly (@tomekwi). Add config options for disabling cache or setting cache path (@bbsbb). Fix for npm 3 erroring when.gitfolder present (@caseyWebb). Updating dependencies.
  • 1.2.0- Callback optional with CLI and do not ignore.gitignorefiles when unpacking (@dai-shi).
  • 1.1.0- Upgrade download for better downloads behind proxies (@msieurtoph).
  • 1.0.2- Fix references to git specifiers. Thanks@jsdevel!
  • 1.0.1- Fix path to CLI.
  • 1.0.0- Avoids duplicate installs and will install from cache.
  • 0.4.1- Fix git reporting non-errors on stderr by running in quiet mode.
  • 0.4.0- Addstrip: 1when downloading to avoid untarring within a sub-directory. Thanks@seei!
  • 0.3.0- Ability to download packages using any URL
  • 0.2.0- Ability to set packages using napa key inpackage.json
  • 0.1.1---depth 1for faster cloning
  • 0.1.0- initial release

License

Copyright (c) 2017 Kyle Robinson Young Licensed under the MIT license.

About

🍷 A helper for installing stuff without a package.json with npm.

Resources

License

Stars

Watchers

Forks

Packages

No packages published