Source Code

Nicole Sullivan edited this page Apr 11, 2014 · 3 revisions

CSS Lint is hosted at GitHub and uses Git for source control. In order to obtain the source code, you must first install Git on your system. Instructions for installing and setting up Git can be found at https://help.github.com/articles/set-up-git.

If you simply want to create a local copy of the source to play with, you can clone the main repository using this command:

git clone git://github.com/CSSLint/csslint.git

If you're planning on contributing to CSS Lint, then it's a good idea to fork the repository. You can find instructions for forking a repository at https://help.github.com/articles/fork-a-repo. After forking the CSS Lint repository, you'll want to create a local copy of your fork.

Directory structure

The CSS Lint directory and file structure is as follows:

  • demos - collection of demos and sample files
  • lib - contains third party libraries for use in the testing
  • release - contains the distributable files from the last official release
    • npm - the folder containing all files necessary for publishing to npm
  • src - the main source code folder
    • cli - files for the command line interfaces
    • core - core CSS Lint functionality including the CSSLint object
    • formatters - contains files defining the formatters
    • rules - contains files defining the CSS Lint rules
    • worker - contains files for the CSS Lint Web Worker
  • tests - the main unit test folder
    • core - tests for core CSS Lint functionality including the CSSLint object
    • formatters - tests for the formatters
    • rules - tests for the CSS Lint rules

The first time you run a build, you'll also notice a build directory is created. This directory is not checked in and has the same structure as the release directory.