Commit 43030169 authored by Romain Courteaud's avatar Romain Courteaud

Prototype node build

parent 2fb78e1e
......@@ -29,6 +29,7 @@ EXTERNALDIR = external
VERSION = 3.32.1
JIOVERSION = ${DISTDIR}/jio-v${VERSION}.js
JIOLATEST = ${DISTDIR}/jio-latest.js
JIONODELATEST = ${DISTDIR}/jio-node-latest.js
all: fetch lint build
......@@ -134,6 +135,29 @@ ${JIOVERSION}: ${EXTERNALDIR}/URI.js \
@mkdir -p $(@D)
cat $^ > $@
#############################################
# Node
#############################################
node: ${JIONODELATEST}
${JIONODELATEST}: ${SRCDIR}/node/jio-start.js \
${EXTERNALDIR}/rsvp-2.0.4.js \
${EXTERNALDIR}/moment.js \
${SRCDIR}/node/jio-external.js \
${SRCDIR}/queries/parser-begin.js \
${SRCDIR}/queries/build/parser.js \
${SRCDIR}/queries/parser-end.js \
${SRCDIR}/queries/query.js \
${SRCDIR}/node/query.js \
${SRCDIR}/jio.date/jiodate.js \
${SRCDIR}/jio.js \
${SRCDIR}/node/jio.js \
${SRCDIR}/jio.storage/uuidstorage.js \
${SRCDIR}/jio.storage/memorystorage.js \
${SRCDIR}/node/jio-end.js
@mkdir -p $(@D)
cat $^ > $@
#############################################
# Jison
#############################################
......
/*global require*/
(function (require) {
"use strict";
var jIO = require('../dist/jio-node-latest.js'),
storage = jIO.createJIO({type: 'memory'});
storage
.put('1', {
foo: 'bar'
})
.then(function (id) {
console.log(id === '1');
return storage.allDocs();
})
.then(function (results) {
console.log(results.data.total_rows === 1);
return storage.get('1');
})
.then(function (result) {
console.log(result);
});
}(require));
module.exports = jIO;
} ({}));
\ No newline at end of file
var RSVP = window.RSVP,
moment = window.moment;
\ No newline at end of file
(function (global) {
var window = {},
Blob = null,
EventTarget = null,
Blob = null,
FileReader = null,
atob = null,
btoa = null,
navigator = null;
\ No newline at end of file
var jIO = window.jIO;
\ No newline at end of file
var QueryFactory = window.QueryFactory,
Query = window.Query;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment