Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 01286dcf638280f081a9e17aad5966115289c341 Mark Cavage committed May 30, 2012
@@ -0,0 +1,9 @@
+/node_modules
+/tmp
+build
+docs/*.json
+docs/*.html
+cscope.in.out
+cscope.po.out
+cscope.out
+.coverage_data
@@ -0,0 +1,10 @@
+[submodule "deps/jsstyle"]
+ path = deps/jsstyle
+ url = git://github.com/davepacheco/jsstyle.git
+[submodule "deps/javascriptlint"]
+ path = deps/javascriptlint
+ url = git://github.com/davepacheco/javascriptlint.git
+
+[submodule "deps/restdown"]
+ path = deps/restdown
+ url = git://github.com/trentm/restdown.git
@@ -0,0 +1,61 @@
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile: basic Makefile for template API service
+#
+# This Makefile is a template for new repos. It contains only repo-specific
+# logic and uses included makefiles to supply common targets (javascriptlint,
+# jsstyle, restdown, etc.), which are used by other repos as well. You may well
+# need to rewrite most of this file, but you shouldn't need to touch the
+# included makefiles.
+#
+# If you find yourself adding support for new targets that could be useful for
+# other projects too, you should add these to the original versions of the
+# included Makefiles (in eng.git) so that other teams can use them too.
+#
+
+#
+# Tools
+#
+BUNYAN := ./node_modules/.bin/bunyan
+NPM := npm
+NODECOVER := ./node_modules/.bin/cover
+NODEUNIT := ./node_modules/.bin/nodeunit
+
+#
+# Files
+#
+DOC_FILES = index.restdown
+JS_FILES := $(shell ls *.js) $(shell find lib test -name '*.js')
+JSL_CONF_NODE = tools/jsl.node.conf
+JSL_FILES_NODE = $(JS_FILES)
+JSSTYLE_FILES = $(JS_FILES)
+JSSTYLE_FLAGS = -f tools/jsstyle.conf
+
+include ./tools/mk/Makefile.defs
+
+#
+# Repo-specific targets
+#
+.PHONY: all
+all: $(NODEUNIT) $(REPO_DEPS)
+ $(NPM) rebuild
+
+$(NODEUNIT):
+ $(NPM) install
+
+CLEAN_FILES += ./node_modules
+
+.PHONY: cover
+cover: $(NODECOVER)
+ @rm -fr ./.coverage_data
+ $(NODECOVER) run $(NODEUNIT) test/*.test.js | $(BUNYAN)
+ $(NODECOVER) report cli
+
+.PHONY: test
+test: $(NODEUNIT)
+ $(NODEUNIT) ./test/client.test.js 2>&1 | $(BUNYAN)
+ $(NODEUNIT) ./test/election.test.js 2>&1 | $(BUNYAN)
+
+include ./tools/mk/Makefile.deps
+include ./tools/mk/Makefile.targ
@@ -0,0 +1,59 @@
+# node-zkplus
+
+`zkplus` is the API you wish [ZooKeeper](http://zookeeper.apache.org/) had for
+[Node.js](http//nodejs.org). It closely resembles the
+[fs](http://nodejs.org/api/fs.html) module. For more informtion, look
+[here](http://mcavage.github.com/node-zkplus).
+
+# Installation
+
+ npm install zkplus
+
+# Usage
+
+ var assert = require('assert');
+ var zkplus = require('zkplus');
+
+ var client = zkplus.createClient({
+ servers: [{
+ host: 'localhost'
+ port: 2181
+ }]
+ });
+
+ client.on('connect', function () {
+ client.mkdirp('/foo/bar', function (err) {
+ assert.ifError(err);
+ client.rmr('/foo', function (err) {
+ assert.ifError(err);
+ client.close();
+ });
+ });
+ });
+
+## License
+
+The MIT License (MIT)
+Copyright (c) 2012 Mark Cavage
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+## Bugs
+
+See <https://github.com/mcavage/node-zkplus/issues>.
Submodule javascriptlint added at 5693fd
Submodule jsstyle added at da42b5
Submodule restdown added at 32c3ed
Oops, something went wrong.

0 comments on commit 01286dc

Please sign in to comment.