Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marianoguerra/legojs
generate HTML using CSS-like selectors
https://github.com/marianoguerra/legojs
Last synced: about 1 month ago
JSON representation
generate HTML using CSS-like selectors
- Host: GitHub
- URL: https://github.com/marianoguerra/legojs
- Owner: marianoguerra
- Created: 2012-03-19T15:12:38.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-07-26T13:22:01.000Z (over 12 years ago)
- Last Synced: 2023-04-21T08:16:32.089Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://marianoguerra.github.com/legojs/
- Size: 207 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rest
Awesome Lists containing this project
README
legojs - generate HTML with CSS-like selectors
==============================================legojs is an js module that allows to generate complex HTML using
a syntax that is similar to CSS selectors.legojs is inspired by zen-coding: https://code.google.com/p/zen-coding/
get it
------::
git clone https://github.com/marianoguerra/legojs
build it
--------this builds the parser for the expressions
::
cd legojs
./build.sh
try it
------http://marianoguerra.github.com/legojs/
test it
-------http://marianoguerra.github.com/legojs/test
or open test/index.html in your browser
use it
------there are two ways of using it, one is like any normal .js file, just add
a script tag and import it (see test/index.html for an example)the other one is using an AMD loader like requirejs, in this case you
just require the lib, it will return you the legojs function standalone and
will add the function to the jquery object in $.lego so you can just ignore it
and use $.lego or use the returned function itself.for an example of out to use it with requirejs see the main page at index.html
author
------Mariano Guerra
license
-------BSD (+ optional beer to the author)