Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Apr 18, 2013
0 parents commit 08b6eaf
Show file tree
Hide file tree
Showing 9 changed files with 1,115 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
/node_modules/
npm-debug.log
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
# BEM.js
15 changes: 15 additions & 0 deletions lib/bemhtml.js
@@ -0,0 +1,15 @@
var bemhtml = exports;

// Runtime
bemhtml.runtime = require('./bemhtml/runtime');

// i-bem
bemhtml.ibem = require('./bemhtml/i-bem');

// Compiler
bemhtml.Compiler = require('./bemhtml/compiler').Compiler;

// API functions
bemhtml.translate = require('./bemhtml/api').translate;
bemhtml.generate = require('./bemhtml/api').generate;
bemhtml.compile = require('./bemhtml/api').compile;
13 changes: 13 additions & 0 deletions lib/bemhtml/api.js
@@ -0,0 +1,13 @@
var bemhtml = require('../bemhtml');

exports.translate = function translate(ast, options) {
return new bemhtml.Compiler(options).translate(ast);
};

exports.generate = function generate(code, options) {
return new bemhtml.Compiler(options).generate(code);
};

exports.compile = function compile(code, options) {
return new bemhtml.Compiler(options).compile(code);
};

0 comments on commit 08b6eaf

Please sign in to comment.