Przeglądaj źródła

added git repo to package.json

master
mort 7 lat temu
rodzic
commit
9a1eb3038e
2 zmienionych plików z 12 dodań i 6 usunięć
  1. 6
    4
      index.js
  2. 6
    2
      package.json

+ 6
- 4
index.js Wyświetl plik

@@ -11,7 +11,7 @@ function Func(args) {
}
Func.prototype = Function.prototype;

module.exports = function(str, vals) {
function Templish(str, vals) {
str = str.replace(/\s+/g, " ").replace(/}}/g, "}}\n");
this.string = str;
this.vals = vals;
@@ -47,7 +47,7 @@ module.exports = function(str, vals) {
}.bind(this));
}

module.exports.prototype.exec = function(vals, cb) {
Templish.prototype.exec = function(vals, cb) {
var str = this.string;

//Prepare generic arguments
@@ -79,7 +79,7 @@ module.exports.prototype.exec = function(vals, cb) {
//If this is the last callback to be executed,
//call back with the resulting string
if (cbsRemaining <= 0)
cb(str);
cb(null, str);
cbsRemaining -= 1;
}

@@ -98,5 +98,7 @@ module.exports.prototype.exec = function(vals, cb) {
//If there's no asynchronous functions to wait for,
//just call back immediately
if (cbsRemaining === 0)
return cb(str);
return cb(null, str);
}

module.exports = Templish;

+ 6
- 2
package.json Wyświetl plik

@@ -1,11 +1,15 @@
{
"name": "templish",
"version": "0.0.1",
"version": "0.0.2",
"description": "HTML templating library for JS",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Martin Dørum Nygaard",
"license": "MIT"
"license": "MIT",
"repository": {
"type": "git",
"url": "gogs@git.mort.coffee:mort/templish.git"
}
}

Ładowanie…
Anuluj
Zapisz