GithubHelp home page GithubHelp logo

sizzle's Introduction

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.

sizzle's People

Contributors

brandonaaron avatar chadkillingsworth avatar chalkers avatar chuyeow avatar csnover avatar danburzo avatar dbjdbj avatar dcherman avatar diegotres avatar dmethvin avatar fjakobs avatar fredj avatar gibson042 avatar gnarf avatar jeresig avatar jitter avatar jonathansampson avatar jzaefferer avatar krinkle avatar kswedberg avatar lostfx avatar markelog avatar mathiasbynens avatar mikesherov avatar pborreli avatar scottgonzalez avatar staabm avatar timmywil avatar valueof avatar walkingeyerobot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.