Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added surroundings for docpad structure

  • Loading branch information...
commit ca45045502946baf11bf6b79c84b748b809082f4 1 parent 48d88ae
@balupton balupton authored
View
6 .npmignore
@@ -1,8 +1,10 @@
.travis*
+Cakefile
Makefile
+History.md
+docpad.coffee
src/
out/demo/
out/test/
-demo/
-test-web/
+out/vendor/
View
5 .travis.yml
@@ -1,9 +1,12 @@
language: node_js
-before_script: "make compile"
+install: "npm install"
+before_script: "./node_modules/.bin/cake test-prepare"
+script: "./node_modules/.bin/cake test"
node_js:
- 0.4
- 0.6
- 0.8
+ - 0.9
notifications:
irc:
- "irc.freenode.org#bevry"
View
133 Cakefile
@@ -0,0 +1,133 @@
+# This file was originally created by Benjamin Lupton <b@lupton.cc> (http://balupton.com)
+# and is currently licensed under the Creative Commons Zero (http://creativecommons.org/publicdomain/zero/1.0/)
+# making it public domain so you can do whatever you wish with it without worry (you can even remove this notice!)
+#
+# If you change something here, be sure to reflect the changes in:
+# - the scripts section of the package.json file
+# - the .travis.yml file
+
+
+# -----------------
+# Variables
+
+WINDOWS = process.platform.indexOf('win') is 0
+NODE = process.execPath
+NPM = if WINDOWS then process.execPath.replace('node.exe','npm.cmd') else 'npm'
+EXT = (if WINDOWS then '.cmd' else '')
+APP = process.cwd()
+BIN = "#{APP}/node_modules/.bin"
+CAKE = "#{BIN}/cake#{EXT}"
+COFFEE = "#{BIN}/coffee#{EXT}"
+DOCPAD = "#{BIN}/docpad#{EXT}"
+OUT = "#{APP}/out"
+SRC = "#{APP}/src"
+
+
+# -----------------
+# Requires
+
+pathUtil = require('path')
+{exec,spawn} = require('child_process')
+safe = (next,fn) ->
+ return (err) ->
+ return next(err) if err
+ return fn()
+
+
+# -----------------
+# Actions
+
+bench = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ spawn(NODE, ["#{OUT}/test/benchmark.js"], {stdio:'inherit',cwd:APP}).on('exit',next)
+
+clean = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ args = [
+ '-Rf'
+ OUT
+ pathUtil.join(APP,'node_modules')
+ pathUtil.join(APP,'*out')
+ pathUtil.join(APP,'*log')
+ ]
+ spawn('rm', args, {stdio:'inherit',cwd:APP}).on('exit',next)
+
+compile = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ spawn(DOCPAD, ['generate'], {stdio:'inherit',cwd:APP}).on('exit',next)
+
+watch = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ spawn(DOCPAD, ['watch'], {stdio:'inherit',cwd:APP}).on('exit',next)
+
+install = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ spawn(NPM, ['install'], {stdio:'inherit',cwd:APP}).on('exit',next)
+
+reset = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ clean opts, safe next, -> install opts, safe next, -> compile opts, next
+
+setup = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ install opts, safe next, ->
+ compile opts, next
+
+test = (opts,next) ->
+ (next = opts; opts = {}) unless next?
+ args = []
+ args.push("--debug-brk") if opts.debug
+ args.push("#{OUT}/test/everything-test.js")
+ args.push("--joe-reporter=list")
+ spawn(NODE, args, {stdio:'inherit',cwd:APP}, next)
+
+finish = (err) ->
+ throw err if err
+ console.log('OK')
+
+
+# -----------------
+# Commands
+
+# bench
+task 'bench', 'benchmark our project', ->
+ bench finish
+
+# clean
+task 'clean', 'clean up instance', ->
+ clean finish
+
+# compile
+task 'compile', 'compile our files', ->
+ compile finish
+
+# dev/watch
+task 'dev', 'watch and recompile our files', ->
+ watch finish
+task 'watch', 'watch and recompile our files', ->
+ watch finish
+
+# install
+task 'install', 'install dependencies', ->
+ install finish
+
+# reset
+task 'reset', 'reset instance', ->
+ reset finish
+
+# setup
+task 'setup', 'setup for development', ->
+ setup finish
+
+# test
+task 'test', 'run our tests', ->
+ test finish
+
+# test-debug
+task 'test-debug', 'run our tests in debug mode', ->
+ test {debug:true}, finish
+
+# test-prepare
+task 'test-prepare', 'prepare out tests', ->
+ setup finish
+
View
2  LICENSE.md
@@ -1,6 +1,6 @@
(The MIT License)
-Copyright (c) 2012 Bevry Pty Ltd <us@bevry.me>
+Copyright (c) 2012+ Bevry Pty Ltd <us@bevry.me>
Copyright (c) 2011 Benjamin Lupton <b@lupton.cc>
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:
View
16 Makefile
@@ -1,16 +0,0 @@
-compile:
- ./node_modules/.bin/coffee -o out/ -c src/
-
-dev:
- ./node_modules/.bin/coffee -w -o out/ -c src/
-
-bench:
- node ./out/test/benchmark.js
-
-test:
- node ./out/test/everything.test.js --joe-reporter=list
-
-test-debug:
- node --debug-brk ./out/test/everything.test.js
-
-.PHONY: compile dev bench test test-debug
View
2  README.md
@@ -75,5 +75,5 @@ Tested and working against backbone versions 0.9.2 and 0.9.9.
## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
-<br/>Copyright &copy; 2012 [Bevry Pty Ltd](http://bevry.me)
+<br/>Copyright &copy; 2012+ [Bevry Pty Ltd](http://bevry.me)
<br/>Copyright &copy; 2011 [Benjamin Lupton](http://balupton.com)
View
20 docpad.coffee
@@ -0,0 +1,20 @@
+# Prepare
+delay = (next) -> setTimeout(next,500)
+
+# Export
+module.exports =
+ events:
+ generateAfter: (opts,next) ->
+ # Prepare
+ docpad = @docpad
+
+ # Test
+ require('bal-util').spawn 'cake test', {output:true}, (err) ->
+ if err
+ message = 'TESTS FAILED'
+ docpad.log('warn', message)
+ else
+ message = 'Tests passed'
+ docpad.log('info', message)
+ delay -> docpad.notify(message)
+ return next()
View
107 package.json
@@ -1,53 +1,58 @@
{
- "name": "query-engine",
- "version": "1.5.0",
- "description": "Query-Engine is a NoSQL and MongoDb compliant query engine. It can run on the server-side with Node.js, or on the client-side within web browsers",
- "homepage": "https://github.com/bevry/query-engine",
- "keywords": [
- "coffeescript",
- "query-engine",
- "nosql",
- "query",
- "sql",
- "pills",
- "search",
- "searching",
- "lucene",
- "filter",
- "filtering",
- "collections"
- ],
- "author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
- "maintainers": [
- "Benjamin Lupton <b@lupton.cc> (http://balupton.com)"
- ],
- "contributors": [
- "Benjamin Lupton <b@lupton.cc> (http://balupton.com)",
- "Farid Neshat <FaridN_SOAD@yahoo.com> (https://github.com/alFReD-NSH)",
- "Nicholas Firth-McCoy (https://github.com/nfm)",
- "Khalid Jebbari <https://github.com/DjebbZ> (https://github.com/DjebbZ)",
- "Andrew Shults <andrewjshults@gmail.com> (https://github.com/andrewjshults)"
- ],
- "bugs": {
- "url": "https://github.com/bevry/query-engine/issues"
- },
- "repository" : {
- "type": "git",
- "url": "http://github.com/bevry/query-engine.git"
- },
- "dependencies": {},
- "devDependencies": {
- "backbone": "0.9.x",
- "underscore": "1.4.x",
- "joe": "1.1.x",
- "coffee-script": "1.4.x",
- "benchmark": "1.0.x"
- },
- "directories": {
- "lib": "./out/lib"
- },
- "scripts": {
- "test": "node ./out/test/everything.test.js --joe-reporter=list"
- },
- "main": "./out/lib/query-engine.js"
+ "name": "query-engine",
+ "version": "1.5.1",
+ "description": "Query-Engine is a NoSQL and MongoDb compliant query engine. It can run on the server-side with Node.js, or on the client-side within web browsers",
+ "homepage": "https://github.com/bevry/query-engine",
+ "keywords": [
+ "coffeescript",
+ "query-engine",
+ "nosql",
+ "query",
+ "sql",
+ "pills",
+ "search",
+ "searching",
+ "lucene",
+ "filter",
+ "filtering",
+ "collections"
+ ],
+ "author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
+ "maintainers": [
+ "Benjamin Lupton <b@lupton.cc> (http://balupton.com)"
+ ],
+ "contributors": [
+ "Benjamin Lupton <b@lupton.cc> (http://balupton.com)",
+ "Farid Neshat <FaridN_SOAD@yahoo.com> (https://github.com/alFReD-NSH)",
+ "Nicholas Firth-McCoy (https://github.com/nfm)",
+ "Khalid Jebbari <https://github.com/DjebbZ> (https://github.com/DjebbZ)",
+ "Andrew Shults <andrewjshults@gmail.com> (https://github.com/andrewjshults)"
+ ],
+ "bugs": {
+ "url": "https://github.com/bevry/query-engine/issues"
+ },
+ "repository" : {
+ "type": "git",
+ "url": "http://github.com/bevry/query-engine.git"
+ },
+ "dependencies": {},
+ "peerDependencies": {
+ "backbone": "~0.9.2"
+ },
+ "devDependencies": {
+ "bal-util": "~1.16.0",
+ "docpad": ">=6.21.4 <7",
+ "docpad-plugin-coffeescript": "2.x",
+ "backbone": "~0.9.2",
+ "underscore": "~1.4.3",
+ "joe": "~1.1.1",
+ "benchmark": "~1.0.0"
+ },
+ "directories": {
+ "lib": "./out/lib"
+ },
+ "scripts": {
+ "test": "./node_modules/.bin/cake test"
+ },
+ "main": "./out/lib/query-engine.js"
}
Please sign in to comment.
Something went wrong with that request. Please try again.