Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[dist] package update

  • Loading branch information...
commit 0daf11ccee78539afb8a9e1517733d814e3d61de 1 parent 3236d61
Paolo Fragomeni authored
View
17 lib/plates.js
@@ -6,15 +6,14 @@
Merge.prototype = {
tag: new RegExp([
- '<',
- '(/?)', // 2 - is closing
- '([-:\\w]+)', // 3 - name
- '((?:[-\\w]+(?:', '=',
- '(?:\\w+|["|\'](?:.*)["|\']))?)*)', // 4 - attributes
- '(/?)', // 5 - is self-closing
- '>'
- ].join('\\s*')
- ),
+ '<',
+ '(/?)', // 2 - is closing
+ '([-:\\w]+)', // 3 - name
+ '((?:[-\\w]+(?:', '=',
+ '(?:\\w+|["|\'](?:.*)["|\']))?)*)', // 4 - attributes
+ '(/?)', // 5 - is self-closing
+ '>'
+ ].join('\\s*')),
attr: /([\-\w]*)=(?:["\']([\-\.\w\s\/]*)["\'])/gi,
View
2  package.json
@@ -19,7 +19,7 @@
"benchmark" : "0.2.x"
},
"scripts": {
- "test": "vows --spec test/*test.js"
+ "test": "vows --spec test/api-test.js"
},
"engines": ["node"],
"main" : "./lib/plates.js"
View
60 test/api-test.js
@@ -6,56 +6,56 @@ var vows = require('vows'),
vows.describe('merge data into markup').addBatch({
'when providing both data and markup': {
- // '(1) a single tag with an `id` that corresponds to a `data-key`.': (
+ '(1) a single tag with an `id` that corresponds to a `data-key`.': (
- // function() {
- // return common.createTest('test-1');
- // }()
+ function() {
+ return common.createTest('test-1');
+ }()
- // ),
+ ),
- // '(2) a deeply nested tag with an `id` that corresponds to a `data-key`.': (
+ '(2) a deeply nested tag with an `id` that corresponds to a `data-key`.': (
- // function() {
- // return common.createTest('test-2');
- // }()
+ function() {
+ return common.createTest('test-2');
+ }()
- // ),
+ ),
- // '(3) a tag with an `id` that corresponds to a `data-key`, having a body of nested tags.': (
+ '(3) a tag with an `id` that corresponds to a `data-key`, having a body of nested tags.': (
- // function() {
- // return common.createTest('test-3');
- // }()
+ function() {
+ return common.createTest('test-3');
+ }()
- // ),
+ ),
- // '(4) a tag with an arbitrary attribute that corresponds to a `data-key`.': (
+ '(4) a tag with an arbitrary attribute that corresponds to a `data-key`.': (
- // function() {
+ function() {
- // var map = new Plates.Map();
- // map.where('src').is('google.com').use('key1');
- // map.where('src').is('yahoo.com').use('key2');
+ var map = new Plates.Map();
+ map.where('src').is('google.com').use('key1');
+ map.where('src').is('yahoo.com').use('key2');
- // return common.createTest('test-4', map);
+ return common.createTest('test-4', map);
- // }()
+ }()
- // ),
+ ),
- // '(5) a tag with a class attribute whith a value that corresponds to a `data-key`.': (
+ '(5) a tag with a class attribute whith a value that corresponds to a `data-key`.': (
- // function() {
+ function() {
- // var map = new Plates.Map();
- // map.where('class').is('hidden').use('key1');
+ var map = new Plates.Map();
+ map.where('class').is('hidden').use('key1');
- // return common.createTest('test-5', map);
+ return common.createTest('test-5', map);
- // }()
+ }()
- // ),
+ ),
'(6) a tag with a class attribute whith a value that corresponds to a `data-key`.': (
View
2  test/perf-test.js
@@ -2,7 +2,7 @@ var Benchmark = require('benchmark');
var suite = new Benchmark.Suite();
var Mustache = require('mustache');
-var Plates = require('../../lib/plates');
+var Plates = require('../lib/plates');
suite
Please sign in to comment.
Something went wrong with that request. Please try again.