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

garden-core

v0.0.6

Published

Small api to install, update and manage garden apps

Downloads

3

Readme

Garden-Core

Small surface api to install, update and manage garden apps. Use in node, requirejs, and browser global.

Build Status

Install

npm install garden-core -g

Command-line

garden-core http://garden20.com/market/details/answers http://admin:secret@localhost:5984

Node usage

var garden_core = require('garden-core');

garden_core.install('http://garden20.com/market/_db', 'bookmarks', 'http://localhost:5984/', 'bookmarks', function(err) {
    if (err) console.log('no bookmarks for you');
});

Jam (requirejs) Usage

jam install garden-code

require(['garden-core'], function(garden_core) {
    garden_core.install('http://garden20.com/market/_db', 'bookmarks', 'http://localhost:5984/', 'bookmarks', function(err) {
        if (err) console.log('no bookmarks for you');
    });
})

Browser Global

  <script src="assets/async.min.js" type="text/javascript"></script>
  <script src="assets/jquery-1.8.3.min.js" type="text/javascript"></script>
  <script src="assets/couchr-browser.js" type="text/javascript"></script>
  <script src="assets/url.js" type="text/javascript"></script>
  <script src="assets/garden-core.min.js" type="text/javascript"></script>
  <script>
    garden_core.install('http://garden20.com/market/_db', 'bookmarks', 'http://localhost:5984/', 'bookmarks', function(err) {
        if (err) console.log('no bookmarks for you');
    });
  </script>

API

install(src_db, doc_id, couch_root_url, db_name, options, callback);

  • src_db* The url of a couch db, eg 'http://me.cool.com:5984/test', 'http://garden20.com/market/_db'
  • doc_id The doc id of the application to install, eg 'bookmarks'
  • couch_root_url The couchdb root url that you want to install your app into, eg 'http://localhost:5984'
  • db_name the name of the db you want to install your app into. It will be created if it does not exist. eg 'my_bookmarks'
  • callback callback function when complete. format: function(err)
  • options options controlling the installation.
    • dashboard_db_name: the db to store an installation doc. default is'dashboard',
    • app_details : additional details to store in the installation doc. defaults to {}
    • install_with_no_reader: do not add any reader roles to the db. setting to true makes db public. defaults to false.
    • additional_member_roles: any additional member roles to set on the security object. defaults to [].
    • update_status_function: A function called to indicate install progess. default is function(msg, percent) {},
    • add_vhost_entries: add a vhost entry for the application. default is false.
    • vhost_hostnames: hostnames to used for the vhost entry. eg ['my.domain.com']. default is []
    • vhost_path: the full path to the design doc, eg '/bookmarks/_design/bookmarks/_rewrite/'
    • switch_strategy_timeout: seconds to wait before switching from CouchDB replication to in memory transfer during installs.

Licenece: MIT