Patterns is a toolkit that enables designers to build rich interactive prototypes without the need for writing any JavaScript. All events are triggered by classes and other attributes in the HTML, without abusing the HTML as a programming language. Accessibility, SEO and well structured HTML are core values of Patterns.
Patterns aims to support at least the two latest major versions of all popular browsers.
Currently that means:
- Apple Safari 5+
- Google Chrome 30+
- Microsoft Internet Explorer 9+
Other browser version may work too, but are not actively tested against.
git clone git://github.com/Patternslib/Patterns.git
cd Patterns
make
This will generate a bundle.js
file which contains Patterns and all its
dependencies.
The individual patterns are located in their own folders in ./src/pat.
Each pattern folder contains some or all of the following files:
- index.html which contains markup that shows a demonstration of the pattern.
- documentation.md which is a Markdown file that documents each pattern's purpose, how to use it and how to configure it.
- A javascript file which implements the pattern's functionality.
- A Sass (.scss) file which provides CSS associated with the pattern.
To generate CSS files from the pattern's included Sass files, type make all_css
and the css files will be generated in the same location as the Sass files.
You'll need to has a Sass compiler installed.
To demo the patterns, simply type make serve
to install the necessary
dependencies and to start a simple Node.js HTTP server.
You can then visit http://localhost:4001 to see the demo site.
To develop on Patterns, clone the repository and set it's push-url to your fork:
git remote set-url --push origin <url_to_your_fork>
Create a branch for the feature/bug you are working on:
git checkout -b <feature>
For inclusion use either a GitHub pull request or create a ticket with a url to your external repository.
The simplest way to run the tests are to use make:
make check
This will install all required npm and bower packages and run the tests.