Permalink
Browse files

added

  • Loading branch information...
1 parent 00cb159 commit c71d466006bd21e90de8124dd265f609e3da7304 @anotherquiz anotherquiz committed Jul 6, 2011
@@ -0,0 +1,2 @@
+build: src/transformer.ometajs
+ @ometajs2js -i src/transformer.ometajs > src/injectrule.js
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && SELF_PATH="$SELF_PATH/$(basename -- "$0")"
+
+while [ -h "$SELF_PATH" ]; do
+ DIR=$(dirname -- "$SELF_PATH")
+ SYM=$(readlink -- "$SELF_PATH")
+ SELF_PATH=$(cd -- "$DIR" && cd -- $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
+done
+
+IR_HOME=$(dirname -- "$(dirname -- "$SELF_PATH")")
+
+node $IR_HOME/lib/injectrule.js $@
+
@@ -0,0 +1,11 @@
+var fs = require('fs'),
+ print = require('sys').print,
+ cssp = require('../../../lib/csspapi.js'),
+ ir = require('../src/injectrule.js'),
+ src = process.argv[2] ? fs.readFileSync(process.argv[2]).toString() : null;
+
+if (src !== null) {
+ print(cssp.translate(cssp.transform(cssp.parse(src), ir.IRTransformer), ir.IRTranslator));
+} else {
+ console.log('USAGE: injectrule filename');
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,8 @@
+var ometajs = require('ometajs'),
+ OMeta = ometajs.OMeta;
+
+ometa IRTransformer {
+ before = sample,
+
+ sample = ['atrules' ['atkeyword' 'sample']] -> [#raw, '* { color: red }']
+}
@@ -0,0 +1,3 @@
+sample { border: 0 }
+
+@sample;

0 comments on commit c71d466

Please sign in to comment.