Skip to content

Commit 90217f3

Browse files
committed
First commit
0 parents  commit 90217f3

File tree

10 files changed

+5602
-0
lines changed

10 files changed

+5602
-0
lines changed

CREDITS

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**************************************************
2+
CREDITS
3+
..................................................
4+
5+
Elfin takes inspirations from following libraries, so BIG THANKS to them...
6+
7+
Slick
8+
https://github.com/subtleGradient/slick
9+
10+
Sizzle
11+
http://sizzlejs.com
12+
https://github.com/jeresig/sizzle
13+
14+
NWMatcher
15+
http://javascript.nwbox.com/NWMatcher/
16+
https://github.com/dperini/nwmatcher

README

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Elfin - a css selector engine - v1.0
2+
==================================================
3+
4+
Elfin is a CSS3 selector engine for HTML documents written in pure JavaScript.
5+
6+
components:
7+
Elfin.parse -- the parser
8+
Elfin.get -- the getter
9+
10+
11+
Building
12+
--------------------------------------------------
13+
Building Elfin is very simple in Linux/Mac. Just run the build script.
14+
15+
On Windows you have to do it manually -- copy the contents of 'src'
16+
directory into a blank file in the order: init.js, parse.js, get.js, last.js.
17+
Save it as elfin.js.
18+
19+
20+
Optimize
21+
--------------------------------------------------
22+
Minify using YUI Compressor or something else you like.
23+
24+
25+
Usage
26+
--------------------------------------------------
27+
To get an array of elements corresponding toa CSS3 selector, do
28+
`Elfin(expr, node)`
29+
or
30+
`Elfin.get(expr, node)`
31+
32+
To get a parsed representation for a CSS3 selector, do
33+
`Elfin.parse(expr)`
34+
This returns a array that contains the output of the parser.
35+
36+
To see the features/bugs Elfin has discovered, do a for-in on
37+
`Elfin.has`
38+
39+
40+
Test
41+
--------------------------------------------------
42+
For experimenting with Elfin, you don't need to build it. Just
43+
run the tester app.
44+
45+
46+
47+

build

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo building Elfin...
4+
5+
echo '' > elfin.js
6+
cat ./src/init.js >> elfin.js
7+
cat ./src/parse.js >> elfin.js
8+
cat ./src/get.js >> elfin.js
9+
cat ./src/last.js >> elfin.js
10+
11+
echo dome building elfin.js

0 commit comments

Comments
 (0)