[Pkg-javascript-commits] [ltx] 161/469: change everything towards ltx

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:01:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit e550e5587f38e727a59446c1d66dffbe23784fc9
Author: Astro <astro at spaceboyz.net>
Date:   Sun Nov 21 01:40:37 2010 +0100

    change everything towards ltx
---
 README.markdown                       | 74 +----------------------------------
 lib/index.js                          |  4 ++
 package.json                          | 19 ++++-----
 test/{test_xml.js => test_element.js} | 16 ++++----
 test/test_xml.js                      | 16 ++++----
 5 files changed, 29 insertions(+), 100 deletions(-)

diff --git a/README.markdown b/README.markdown
index b8541e4..b08b6dc 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,80 +1,8 @@
-# node-xmpp
+# Less-Than XML
 
-idiomatic XMPP library for [node.js](http://nodejs.org/)
 
-
-## Installation with [npm](http://github.com/isaacs/npm)
-
-    npm install node-xmpp
-
-
-## Motivation
-
-You like [Strophe.js](http://code.stanziq.com/strophe/)? You bought a
-copy of
-[Professional XMPP Programming with JavaScript and jQuery](http://professionalxmpp.com/)?
-You even want to use the same XMPP code for the web and node.js? Then
-*you're wrong here:* go to [xmppjs](http://github.com/mwild1/xmppjs).
-
-Objectives of *node-xmpp:*
-
-* Use node.js conventions, especially `EventEmitter`, ie. for write
-  buffer control
-* Fast parsing, `node-expat` was written with this library in mind
-* Client support for both XMPP clients and components
-* Optional server infrastructure with `Router`
-* After authentication, leave trivial protocol bits to the user (later
-  we could offer helpers for entity capabilities hashing, etc)
-
-
-## Features
-
-* Client authentication with SASL DIGEST-MD5, PLAIN, ANONYMOUS, X-FACEBOOK-PLATFORM
-* `_xmpp-client._tcp` SRV record support
-* Simple JID parsing with Stringprep normalization
-* XML builder & serialization
-* xmlns-aware
-* [Component](http://xmpp.org/extensions/xep-0114.html) connections
-* Run your own server/talk to other servers with `xmpp.Router`
-
-
-## Dependencies
-
-* [node-expat](http://github.com/astro/node-expat)
-* [node-stringprep](http://github.com/astro/node-stringprep)
-
-
-## Design
-
-    ┌────────────┐ has a ┌────────────┐
-    │ net.Stream │←──────┤ Connection │
-    └────────────┘       └─────┬──────┘
-                               │
-          ┌────────────┬───────┴───┐
-          │            │           │
-    ┏━━━━━┷━━━━┓ ┏━━━━━┷━━━━━┓ ┌───┴────┐
-    ┃  Client  ┃ ┃ Component ┃ │ Server │
-    ┗━━━━━━━━━━┛ ┗━━━━━━━━━━━┛ └───┬────┘
-                                   │
-             ┌─────────────────────┤
-             │                     │
-    ┌────────┴───────┐ ┌───────────┴────┐
-    │ OutgoingServer │ │ IncomingServer │
-    └────────────────┘ └────────────────┘
-         has many ↑        ↑ has many
-          creates │        │ accepts
-                 ┏┷━━━━━━━━┷┓
-                 ┃  Router  ┃
-                 ┗━━━━━━━━━━┛
-
-
-This foundation is complemented by two basic data structures:
-
-* *JID:* a Jabber-Id, represented as a triple of `user`, `domain`,
-   `resource`
 * *Element:* any XML Element
 
-Desires about the API? Propose them ASAP!
 
 ### Building XML Elements
 
diff --git a/lib/index.js b/lib/index.js
new file mode 100644
index 0000000..3aa7fbe
--- /dev/null
+++ b/lib/index.js
@@ -0,0 +1,4 @@
+var element = require('./element');
+
+exports.Element = element.Element;
+exports.escapeXml = element.escapeXml;
diff --git a/package.json b/package.json
index a848739..e31ef92 100644
--- a/package.json
+++ b/package.json
@@ -1,21 +1,18 @@
-{ "name": "node-xmpp"
-,"version": "0.2.2"
-,"main": "./lib/xmpp"
-,"description": "Idiomatic XMPP client, component & server library for node.js"
+{ "name": "ltx"
+,"version": "0.0.1"
+,"main": "./lib/index"
+,"description": "<xml for=\"node.js\">"
 ,"author": "Stephan Maka"
-,"dependencies": {"node-expat": "1.1.0"
-		 ,"node-stringprep": "0.0.2"
-		 }
 ,"repositories": [{"type": "git"
-		  ,"path": "git://github.com/astro/node-xmpp.git"
+		  ,"path": "http://github.com/astro/ltx.git"
 		  }]
-,"homepage": "http://github.com/astro/node-xmpp"
-,"bugs": "http://github.com/astro/node-xmpp/issues"
+,"homepage": "http://github.com/astro/ltx"
+,"bugs": "http://github.com/astro/ltx/issues"
 ,"maintainers": [{"name": "Astro"
 		 ,"email": "astro at spaceboyz.net"
 		 ,"web": "http://spaceboyz.net/~astro/"
 		 }]
-,"contributors": ["Stephan Maka", "Derek Hammer", "Daniel Zelisko", "Michael Geers"]
+,"contributors": ["Stephan Maka"]
 ,"licenses": [{"type": "GPLv3"}]
 ,"engine": "node"
 }
diff --git a/test/test_xml.js b/test/test_element.js
similarity index 70%
copy from test/test_xml.js
copy to test/test_element.js
index 52ec0be..0535cff 100644
--- a/test/test_xml.js
+++ b/test/test_element.js
@@ -1,30 +1,30 @@
 var vows = require('vows'),
 assert = require('assert'),
-XML = require('./../lib/xmpp/xml');
+ltx = require('./../lib/index');
 
-vows.describe('XML').addBatch({
+vows.describe('ltx').addBatch({
     'serialization': {
 	'serialize an element': function() {
-	    var e = new XML.Element('e');
+	    var e = new ltx.Element('e');
 	    assert.equal(e.toString(), '<e/>');
 	},
 	'serialize an element with attributes': function() {
-	    var e = new XML.Element('e',
+	    var e = new ltx.Element('e',
 				    { a1: 'foo' });
 	    assert.equal(e.toString(), '<e a1="foo"/>');
 	},
 	'serialize an element with attributes to entities': function() {
-	    var e = new XML.Element('e',
+	    var e = new ltx.Element('e',
 				    { a1: '"well"' });
 	    assert.equal(e.toString(), '<e a1=""well""/>');
 	},
 	'serialize an element with text': function() {
-	    var e = new XML.Element('e').t('bar').root();
+	    var e = new ltx.Element('e').t('bar').root();
 	    assert.equal(e.toString(), '<e>bar</e>');
 	},
 	'serialize an element with text to entities': function() {
-	    var e = new XML.Element('e').t('1 < 2').root();
+	    var e = new ltx.Element('e').t('1 < 2').root();
 	    assert.equal(e.toString(), '<e>1 < 2</e>');
-	},
+	}
     }
 }).run();
diff --git a/test/test_xml.js b/test/test_xml.js
index 52ec0be..504dda3 100644
--- a/test/test_xml.js
+++ b/test/test_xml.js
@@ -1,30 +1,30 @@
 var vows = require('vows'),
 assert = require('assert'),
-XML = require('./../lib/xmpp/xml');
+ltx = require('./../lib/index');
 
-vows.describe('XML').addBatch({
+vows.describe('element').addBatch({
     'serialization': {
 	'serialize an element': function() {
-	    var e = new XML.Element('e');
+	    var e = new ltx.Element('e');
 	    assert.equal(e.toString(), '<e/>');
 	},
 	'serialize an element with attributes': function() {
-	    var e = new XML.Element('e',
+	    var e = new ltx.Element('e',
 				    { a1: 'foo' });
 	    assert.equal(e.toString(), '<e a1="foo"/>');
 	},
 	'serialize an element with attributes to entities': function() {
-	    var e = new XML.Element('e',
+	    var e = new ltx.Element('e',
 				    { a1: '"well"' });
 	    assert.equal(e.toString(), '<e a1=""well""/>');
 	},
 	'serialize an element with text': function() {
-	    var e = new XML.Element('e').t('bar').root();
+	    var e = new ltx.Element('e').t('bar').root();
 	    assert.equal(e.toString(), '<e>bar</e>');
 	},
 	'serialize an element with text to entities': function() {
-	    var e = new XML.Element('e').t('1 < 2').root();
+	    var e = new ltx.Element('e').t('1 < 2').root();
 	    assert.equal(e.toString(), '<e>1 < 2</e>');
-	},
+	}
     }
 }).run();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list