Permalink
Browse files

0.1.8

  • Loading branch information...
1 parent 538daa5 commit 8957a04931bc60bd0010d9832e34c3c519ab0b77 @satyr committed May 14, 2012
Showing with 35 additions and 35 deletions.
  1. +1 −1 ckup.co
  2. +25 −25 ckup.js
  3. +1 −1 index.co
  4. +6 −6 index.html
  5. +2 −2 package.json
View
2 ckup.co
@@ -1,7 +1,7 @@
# `ckup = require \ckup` in CommonJS, `self.Ckup` in browser etc.
ckup = exports ? @Ckup = {}
ckup import
- VERSION: \0.1.8b
+ VERSION: \0.1.8
render: (template, mixin) -> @renderer(template) mixin
View
50 ckup.js
@@ -1,20 +1,20 @@
(function(){
- var ckup, tag, _i, _ref, _len, __slice = [].slice;
+ var ckup, tag, __i, __ref, __len, __slice = [].slice;
ckup = typeof exports != 'undefined' && exports !== null
? exports
: this.Ckup = {};
- ckup.VERSION = '0.1.8b';
+ ckup.VERSION = '0.1.8';
ckup.render = function(template, mixin){
return this.renderer(template)(mixin);
};
ckup.renderer = function(template){
- var _this = this;
+ var __this = this;
if (typeof template !== 'function') {
template = this.compile(template);
}
return function(mixin){
var me;
- me = __clone(_this);
+ me = __clone(__this);
if (mixin) {
__import(me, mixin);
}
@@ -29,7 +29,7 @@
};
ckup._ = '';
ckup.css = function(rules){
- var code, selector, children, that, kv, selectors, declarations, subrules, key, val, v, ss, k, s, _i, _ref, _len, _j, _len2;
+ var code, selector, children, that, kv, selectors, declarations, subrules, key, val, v, ss, k, s, __i, __ref, __len, __j, __len1;
code = '';
if (typeof rules === 'function') {
rules = rules.call(this);
@@ -40,8 +40,8 @@
children = children.call(this);
}
if (that = children.mixin, delete children.mixin, that) {
- for (_i = 0, _len = (_ref = [].concat(that)).length; _i < _len; ++_i) {
- kv = _ref[_i];
+ for (__i = 0, __len = (__ref = [].concat(that)).length; __i < __len; ++__i) {
+ kv = __ref[__i];
__importAll(children, kv);
}
}
@@ -53,8 +53,8 @@
case 'number':
if ((key = this.decamelize(key)).charAt() === '$') {
key = key.slice(1);
- for (_i = 0, _len = (_ref = this.VENDORS).length; _i < _len; ++_i) {
- v = _ref[_i];
+ for (__i = 0, __len = (__ref = this.VENDORS).length; __i < __len; ++__i) {
+ v = __ref[__i];
declarations += " -" + v + "-" + key + ": " + val + ";\n";
}
}
@@ -63,10 +63,10 @@
default:
ss = [];
selectors || (selectors = selector.split(this.COMMA));
- for (_i = 0, _len = (_ref = key.split(this.COMMA)).length; _i < _len; ++_i) {
- k = _ref[_i];
- for (_j = 0, _len2 = selectors.length; _j < _len2; ++_j) {
- s = selectors[_j];
+ for (__i = 0, __len = (__ref = key.split(this.COMMA)).length; __i < __len; ++__i) {
+ k = __ref[__i];
+ for (__j = 0, __len1 = selectors.length; __j < __len1; ++__j) {
+ s = selectors[__j];
ss.push(s + " " + k);
}
}
@@ -120,11 +120,11 @@
this._ += "&" + (typeof it === 'number' ? '#' + it : it) + ";";
};
ckup.element = function(name, args, tailless){
- var code, bodies, arg, key, val, body, _i, _len;
+ var code, bodies, arg, key, val, body, __i, __len;
code = '<' + name;
bodies = [];
- for (_i = 0, _len = args.length; _i < _len; ++_i) {
- arg = args[_i];
+ for (__i = 0, __len = args.length; __i < __len; ++__i) {
+ arg = args[__i];
if (typeof arg === 'object') {
for (key in arg) {
val = arg[key];
@@ -139,8 +139,8 @@
return;
}
this._ += code + "\n>";
- for (_i = 0, _len = bodies.length; _i < _len; ++_i) {
- body = bodies[_i];
+ for (__i = 0, __len = bodies.length; __i < __len; ++__i) {
+ body = bodies[__i];
if (typeof body === 'function') {
body = body.call(this);
}
@@ -151,14 +151,14 @@
this._ += "</" + name + ">";
};
ckup.A = function(url, txt){
- var _ref;
- this.element('a', (_ref = __slice.call(arguments), _ref[0] = {
+ var __ref;
+ this.element('a', (__ref = __slice.call(arguments), __ref[0] = {
href: url
- }, _ref[1] = txt || this.quote(url), _ref));
+ }, __ref[1] = txt || this.quote(url), __ref));
};
- for (_i = 0, _len = (_ref = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr']).length; _i < _len; ++_i) {
- tag = _ref[_i];
- (_fn.call(this, tag === 'area' || tag === 'base' || tag === 'br' || tag === 'col' || tag === 'command' || tag === 'embed' || tag === 'hr' || tag === 'img' || tag === 'input' || tag === 'keygen' || tag === 'link' || tag === 'meta' || tag === 'param' || tag === 'source' || tag === 'track' || tag === 'wbr', tag));
+ for (__i = 0, __len = (__ref = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'map', 'mark', 'menu', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr']).length; __i < __len; ++__i) {
+ tag = __ref[__i];
+ (__fn.call(this, tag === 'area' || tag === 'base' || tag === 'br' || tag === 'col' || tag === 'command' || tag === 'embed' || tag === 'hr' || tag === 'img' || tag === 'input' || tag === 'keygen' || tag === 'link' || tag === 'meta' || tag === 'param' || tag === 'source' || tag === 'track' || tag === 'wbr', tag));
}
ckup.$ = ckup.quote, ckup.R = ckup.raw, ckup.T = ckup.text, ckup.E = ckup.entity, ckup.v = ckup['var'];
function __clone(it){
@@ -174,7 +174,7 @@
for (var key in src) obj[key] = src[key];
return obj;
}
- function _fn(tailless, tag){
+ function __fn(tailless, tag){
ckup[tag] = function(){
this.element(tag, arguments, tailless);
};
View
2 index.co
@@ -30,7 +30,7 @@
code $ 'coco> '
strong -> text '"Hello, world!"'
ol ->
- do li3 = -> li i-~it for i til 3; void
+ do li3 = !-> li i-~it for i til 3
ul -> li3 3
'''
View
12 index.html
@@ -49,7 +49,7 @@
code $ 'coco> '
strong -> text '"Hello, world!"'
ol ->
- do li3 = -> li i-~it for i til 3; void
+ do li3 = !-> li i-~it for i til 3
ul -> li3 3
</textarea><button id="run" title="render"
> &#x2193; </button><a id="doc" href="docs.htm"
@@ -59,16 +59,16 @@
></script><script src="ckup.js"
></script><script
>new function (){
- var id, _i, _ref, _len, _this = this;
- for (_i = 0, _len = (_ref = ['kup', 'run', 'url', 'htm']).length; _i < _len; ++_i) {
- id = _ref[_i];
+ var id, __i, __ref, __len, __this = this;
+ for (__i = 0, __len = (__ref = ['kup', 'run', 'url', 'htm']).length; __i < __len; ++__i) {
+ id = __ref[__i];
this[id] = document.getElementById(id);
}
this.run.onclick = function(){
- return _this.htm.value = Ckup.render(_this.kup.value);
+ return __this.htm.value = Ckup.render(__this.kup.value);
};
return this.url.onclick = function(){
- return open('data:text/html,' + encodeURIComponent(_this.htm.value));
+ return open('data:text/html,' + encodeURIComponent(__this.htm.value));
};
}</script><a href="https://github.com/satyr/ckup"
><img id="ribbon" alt="fork-me-on-github" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"/></a>
View
4 package.json
@@ -1,4 +1,4 @@
-{"name": "ckup", "version": "0.1.7"
+{"name": "ckup", "version": "0.1.8"
,"description": "Markup as Coco"
,"keywords" : ["html", "css", "template", "coco"]
@@ -12,7 +12,7 @@
,"bugs" : "https://github.com/satyr/ckup/issues"
,"repository": {"type": "git", "url": "git://github.com/satyr/ckup.git"}
-,"engines": {"node": ">=0.6.6"}, "dependencies": {"coco": ">= 0.7.0"}
+,"engines": {"node": ">=0.6.15"}, "dependencies": {"coco": ">= 0.7.1"}
,"main": "./ckup", "bin": "./cli.co", "files": ["ckup.js", "cli.co"]
}

0 comments on commit 8957a04

Please sign in to comment.