A sizzlin' hot selector engine.
Go to file
2013-11-13 22:01:39 -05:00
dist Update version to 1.10.12 2013-11-13 22:01:39 -05:00
speed Use bower for speed framework dependencies. Add .bowerrc. 2013-08-27 14:59:05 -04:00
src No ticket: Small optimization in "text" pseudo. Close gh-227. 2013-11-13 11:01:47 -05:00
test Ensure native implementations of getElementsByClassName and compareDocumentPosition. Fixes gh-228. 2013-10-17 11:23:46 -04:00
.bowerrc Use bower for speed framework dependencies. Add .bowerrc. 2013-08-27 14:59:05 -04:00
.gitattributes Enforce Unix-style line endings for text files 2013-01-11 12:53:48 -05:00
.gitignore Install QUnit with bower 2013-07-10 11:38:59 -04:00
.jshintrc Conform to new style guide for jshintrc's. Close gh-201. 2013-04-09 12:39:38 -04:00
.mailmap No ticket: Correct mailmap. Close gh-206. 2013-04-19 12:57:01 -04:00
AUTHORS.txt Fixed bower.json typo. Closes gh-217. 2013-07-05 09:39:42 -04:00
bower.json Update version to 1.10.12 2013-11-13 22:01:39 -05:00
CONTRIBUTING.md Added CONTRIBUTING.md. 2013-05-14 15:18:42 -04:00
Gruntfile.js Fix release task to avoid race condition when updating the version for multiple files 2013-11-13 22:01:25 -05:00
MIT-LICENSE.txt Build sizzle with grunt and embed version from package.json. Include built files in repo for convenience. Add notes in README. Update copyrights. 2013-03-19 15:54:12 -04:00
package.json Update version to 1.10.12 2013-11-13 22:01:39 -05:00
README.md Clarify some README headers. Supplements gh-230. 2013-11-12 13:51:18 -05:00

Sizzle

A pure-JavaScript CSS selector engine designed to be easily dropped in to a host library.

More information: http://sizzlejs.com/

Discussion: http://groups.google.com/group/sizzlejs

Documentation: https://github.com/jquery/sizzle/wiki/Sizzle-Documentation

Browser support: https://github.com/jquery/sizzle/wiki/Sizzle-Documentation#wiki-browsers

What you need to build Sizzle

In order to build Sizzle, you need to have Node.js/npm latest and git 1.7 or later.
(Earlier versions might work OK, but are not tested.)

Windows users have two options:

  1. Install msysgit (Full installer for official Git) and a binary version of Node.js. Make sure all two packages are installed to the same location (by default, this is C:\Program Files\Git).
  2. Install Cygwin (make sure you install the git and which packages), and a binary version of Node.js.

Mac OS users should install Xcode (comes on your Mac OS install DVD, or downloadable from Apple's Xcode site) and Homebrew. Once Homebrew is installed, run brew install git to install git, and brew install node to install Node.js.

Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source if you swing that way. Easy-peasy.

How to build Sizzle

First, clone a copy of the main Sizzle git repo by running:

git clone git://github.com/jquery/sizzle.git

Install the grunt-cli package so that you will have the correct version of grunt available from any project that needs it. This should be done as a global install:

npm install -g grunt-cli

Enter the Sizzle directory and install the Node dependencies, this time without specifying a global install:

cd sizzle && npm install

Make sure you have grunt installed by testing:

grunt -version

Then, to get a complete, minified (w/ UglifyJS2), linted (w/ JSHint) version of Sizzle, type the following:

grunt build

The built version of Sizzle will be put in the dist/ subdirectory, along with the minified copy and associated map file.

Testing

  • First, make sure you have bower installed.
  • Run 'bower install' to install QUnit
  • Open test/index.html in the browser or grunt or grunt qunit on the command line
  • The actual unit tests are in the test/unit directory.

Developing with grunt

  • grunt will lint, build, test, and compare the sizes of the built files.
  • grunt jshint will only lint sizzle.js and the tests.
  • grunt watch can be run to re-lint, re-build, and re-test files as you change them.