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

rude

v0.0.6

Published

Distributed Asset Management that Integrates with Git

Downloads

10

Readme

Rude Distributed CMS

Rude is a distributed asset management system.

  • rude is a command-line driven
  • rude is distributed
  • rude plays nicely with git

Rude keeps your git repositories lean and focused on the code.

Assets

Rude manages assets. A typical web project contains may contain a lot of images, videos, gzipped downloads, etc.

These are inappropriate for storage in Git. Git sees a project in its entirety, and shuffling large binary assets in and out will bloat your repository. Rude lets you separate your assets, without losing the guaruntees afforded by Git.

Rude tracks your assets in a single inventory file that is lean, and easy to track using Git.

Usage

Create a new local repository:

$ rude init
[OKAY] New local rude database initialized at http://localhost:5984/rude

Rude expects to be initialized at the root of your Git checkout directory.

Tracking Assets

Track assets by adding them to the Rude database:

$ rude add path/to/file.ext
[OKAY] New asset added to local database as 'file.ext'
[INFO] Asset id 012927f794d2462ae6d5b0bcf1ee01bfb16571cc

Assets are stored in a single bucket; each asset requires a unique name. Rude will error if you attempt to over write an existing asset.

$ rude add -f path/to/new/file.ext
[OKAY] Existing asset 'file.ext' replaced
[INFO] Asset id 7e792aa144129cec0c25b1e2bd55bee50d30b866

Rude will automatically add the asset to your .gitignore file, and update the Rude manifest.

Rude Manifest

The Rude manifest is a single file at the root of your Git repository called assets.json. It is a simple JSON encoded mapping matching asset names to their hash sums.

{
    "helloworld": "7e792aa144129cec0c25b1e2bd55bee50d30b866", 
    "goodbye": "f4485f480d8e52aca885ddadbeed186bc2682500"
}

This file should be tracked in Git, in lieu of tracking the actual assets.

Usage

Rude works by returning mapping asset names to URLs in your projects and templates. The URLs returned depend on runtime configurations. When running locally in development, Rude returns URLs from your local CouchDB database.

Node.js

Require Rude somewhere in your project:

var rude = require('rude')
var rude('helloworld')

console.log(rude)

This will echo something like:

http://localhost:5984/rude/7e792aa144129cec0c25b1e2bd55bee50d30b866/helloworld.jpg

Production

When your project is ready for production, Rude can upload your assets to their appropriate servers, or distribution networks.

Amazon S3

$ rude publish s3

WebDAV

$ rude publish http://server/dav

SSH

$ rude publish user@host:/path/to/web