npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

haven

v0.5.5

Published

Browser Package Manager

Downloads

13

Readme

Haven

A dependency manager for web applications

Haven is a dependency manager for front-end web applications, which will integrate nicely with other build tools. Haven comes with it's own Central Repository but can also take dependencies from Maven repositories, including the many webjar artifacts, the Bower repository, as well as any other private repositories that you point it at. Haven does not make any assumptions, it is completely agnostic to your choice of build tool, source code repository and code. A haven artifact can contain any type of asset, and any number of assets and it does not enforce any standards (eg. AMD, CommonJS)

Installing Haven

Haven depends on NodeJS and NPM. Once these are installed run the following command to install Haven.

npm install -g haven

Using Haven

Configuring Haven

Haven requires a haven.json file in the root of your project. As a minimum this should include the project name and current version

{
	"name": "my-artifact",
	"version": "0.1.0"
}

Configuring dependencies

{
	...
	"dependencies": [
		{
			"name": "my-artifact",
			"version": "0.1.0"
		}
	]
}
Take only certain files from the artifact
{
	...
	"dependencies": [
		{
			"name": "my-artifact",
			"version": "0.1.0",
			"includes": ["file1.js"]
		}
	]
}
Set the scope of a dependency

The default scope is "main", and only these dependencies are transient.

{
	...
	"dependencies": [
		{
			"name": "my-artifact",
			"version": "0.1.0",
			"scope": "test"
		}
	]
}

Defining which files are included in your artifact

{
	...
	"artifacts": [
		{
			"files": [
				"test.js"
			]
		}
	],
}

Defining multiple artifacts

The following example will deploy 2 artifacts "my-artifact" and "my-artifact-min" containing different files

{
	...
	"artifacts": [
		{
			"files": [
				"test.js"
			]
		},
		{
			"id": "min",
			"files": [
				"test-min.js"
			]
		}
	]
}

Mapping files to your artifact

The following example will take src/test.js and put it in the artifact as my-artifact.js at the top level. It will also include the contents of the assets directory and include those files at the top level.

{
	...
	"artifacts": [
		{
			"files": [
				"src/test.js": "my-artifact.js"
				"assets": "."
			]
		}
	],
}

Configuring extra repositories for dependencies

The default repository type is "haven", but haven can also support maven repositories.

{
	...
	"repositories": {
		"dependencies": [
			{
				"url": "http://localhost:8080/haven-repository",
				"type": "haven"
			}
		]
	}
}

Configuring distribution repositories

{
	...
	"repositories": {
		"distribution": [
			{
				"url": "http://localhost:8080/haven-repository"
			}
		]
	}
}

The Haven command line

Updating dependencies

haven update

Installing artifacts into your local repository

haven install

Deploying artifacts to a remote repository

haven deploy

Cleaning haven dependencies

haven clean

Cleaning local repository

haven cleanCache