summaryrefslogtreecommitdiff
path: root/build-tools/lib/less/tree.js
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2012-09-10 17:04:29 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2012-09-10 17:04:29 +0900
commitf3bc06001f660ef156e0895f4be1e81a0ac99502 (patch)
tree4319859b727600c6d8382b95e68a0c0d52cf38f0 /build-tools/lib/less/tree.js
parentb087adb7b7df900f9656425e5cea9dc7abdf935b (diff)
downloadweb-ui-fw-f3bc06001f660ef156e0895f4be1e81a0ac99502.tar.gz
web-ui-fw-f3bc06001f660ef156e0895f4be1e81a0ac99502.tar.bz2
web-ui-fw-f3bc06001f660ef156e0895f4be1e81a0ac99502.zip
Revert "Export"
This reverts commit b087adb7b7df900f9656425e5cea9dc7abdf935b.
Diffstat (limited to 'build-tools/lib/less/tree.js')
-rw-r--r--build-tools/lib/less/tree.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/build-tools/lib/less/tree.js b/build-tools/lib/less/tree.js
new file mode 100644
index 00000000..eb08aa4f
--- /dev/null
+++ b/build-tools/lib/less/tree.js
@@ -0,0 +1,13 @@
+require('less/tree').find = function (obj, fun) {
+ for (var i = 0, r; i < obj.length; i++) {
+ if (r = fun.call(obj, obj[i])) { return r }
+ }
+ return null;
+};
+require('less/tree').jsify = function (obj) {
+ if (Array.isArray(obj.value) && (obj.value.length > 1)) {
+ return '[' + obj.value.map(function (v) { return v.toCSS(false) }).join(', ') + ']';
+ } else {
+ return obj.toCSS(false);
+ }
+};