<commit_before># edX Pattern Library
The (working) Visual, UI, and Front End Styleguide for edX.

## Overview
This library contains the following:

* [A working preview and documentation system for edX application UI](http://code.edx.org/ux-pattern-library)
* Styleguides and standards for [general Front End](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-General), [HTML](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-HTML), [Sass/CSS](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-Sass-&-CSS), and [Accessibility-minded](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-Accessibility) development
* TODO: Portable Sass/CSS modules for use within edX applications

- - -

## Usage
To work on the code of this project, you'll need the following things installed on your local machine.

1. [Jekyll](http://jekyllrb.com/)
2. [NodeJS](http://nodejs.org/)
3. [GulpJS](https://github.com/gulpjs/gulp) + other gulp-based packages

### Install Jekyll
The Pattern Library is managed through Jekyll, so you'll need to install that initially. [Jekyll requires Ruby, Rubygems and a Linux, Unix or Mac OSX system](http://jekyllrb.com/docs/installation/).

**Mac Users**:
```
$ gem install jekyll
```

Windows users: Windows users have a bit more work to do, but luckily [@juthilo](https://github.com/juthilo) has provided some instructions with his [Run Jekyll on Windows guide](https://github.com/juthilo/run-jekyll-on-windows).

You may also need to install Pygments, the Python syntax highlighter for code snippets that plays nicely with Jekyll (which we use to highlight Front End source code). Read more about this in [the Jekyll docs](http://jekyllrb.com/docs/templates/#code_snippet_highlighting).

### Install NodeJS
If you've never used Node or npm before, you'll need to install Node. If you use homebrew, do:

```
brew install node
```

Otherwise, you can download and install from [here](http://nodejs.org/download/).

### Install/Update Gulp + Project Dependencies
From the directory you've checked out this repo into locally, run:

```
npm install
```

This runs through all dependencies listed in package.json and downloads them to a node_modules folder in your project directory.

**NOTE: You may need to run this more than just once (if encountering errors when running the gulp command) as new dependencies may have been added**

#### The Gulp Command
To run the version of gulp installed local to the project, in the root of your this project, run:

```
./node_modules/.bin/gulp
```

**WAT.** Why can't I just run `gulp`? Well, you could install gulp globally with `npm install -g gulp`, which will add the gulp script to your global bin folder, but it's always better to use the version that's specified in your project's package.json.  My solution to this is to simply alias `./node_modules/.bin/gulp` to `gulp`. Open up `~/.zshrc` or `~./bashrc` and add the following line:

```
alias gulp='node_modules/.bin/gulp'
```

Now, running `gulp` in the project directory will use the version specified and installed from the `package.json` file.

### Run Locally (w/ Gulp Workflow)
To view the Pattern Library locally (and to watch for any local changes to content/assets), run the `default` gulp task with:

```
gulp
```

This will run the `default` gulp task defined in `gulpfile.js`, which has the following task dependencies: `['styles', pl_styles', 'images', 'pl_images', pl_scripts, jekyll-build' 'watch']`

* The `styles` and `pl_styles` tasks compile your css files.
* `images` and `pl_images` copies images from a source folder, performs optimizations, the outputs them into the build folder
* `jekyll-build` and `jekyll-rebuild` run the local jekyll server/preview and re-process any layouts, posts, or templates changed.
* `watch` will start watching source files and will re-run the appropriate tasks when those files change.

**NOTE: some gulp tasks had to be separated to support both the pattern library 1)elements and 2)reference site UI separately.** Any task prefixed with `pl_*` refers to the reference site UI and not the elements.

### Publishing & Viewing Remotely
The most up-to-date version of the library can be viewed on our public domain, **http://code.edx.org/ux-pattern-library**

When contributing, please:

1. Make pull requests against the master branch
2. Wait for an edX UX Team member to review your contribution

**NOTE:** Merging or committing to the ``gh-pages`` branch of this repo is never a good idea. This branch is used to publish releases of the library to its public domain.

- - -

## Contributing
**NOTE**: We are currently not accepting contributions from individuals outside of edX. Once we have more progress under our belts and awareness of the standards and methods used to in this library, we'll be reaching out to more individuals for support.

If you have questions in the meantime, please email [<EMAIL>](mailto:<EMAIL>).

### Resources and Background Information
When contributing, its assumed that you're already familar with the following:

* [Our Front End Coding Styleguides](https://github.com/edx/ux-pattern-library/wiki)
* [Jekyll in General](http://jekyllrb.com/docs/home/)
* [Writing Posts in Jekyll](http://jekyllrb.com/docs/posts/)

- - -

##Heads Ups

###Pattern Library Elements vs. Reference Site UI
This repository contains both the code needed to generate pattern library elements as well as a reference site to view/learn about these elements. When and where possible, we've tried to keep the assets needed for both separate by:

* prefixing any reference site UI with `pl-*` class names in our site templates and Sass/CSS;
* containing any reference site UI within the ``_src/pl/`` directory.

- - -

## Contributors
* <NAME> (@clrux)
* <NAME> (@talbs)
<commit_msg>Fix #17: correcting broken documentation site links in README.md<commit_after># edX Pattern Library
The (working) Visual, UI, and Front End Styleguide for edX.

## Overview
This library contains the following:

* [A working preview and documentation system for edX application UI](http://ux.edx.org)
* Styleguides and standards for [general Front End](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-General), [HTML](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-HTML), [Sass/CSS](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-Sass-&-CSS), and [Accessibility-minded](https://github.com/edx/ux-pattern-library/wiki/Styleguide:-Accessibility) development
* TODO: Portable Sass/CSS modules for use within edX applications

- - -

## Usage
To work on the code of this project, you'll need the following things installed on your local machine.

1. [Jekyll](http://jekyllrb.com/)
2. [NodeJS](http://nodejs.org/)
3. [GulpJS](https://github.com/gulpjs/gulp) + other gulp-based packages

### Install Jekyll
The Pattern Library is managed through Jekyll, so you'll need to install that initially. [Jekyll requires Ruby, Rubygems and a Linux, Unix or Mac OSX system](http://jekyllrb.com/docs/installation/).

**Mac Users**:
```
$ gem install jekyll
```

Windows users: Windows users have a bit more work to do, but luckily [@juthilo](https://github.com/juthilo) has provided some instructions with his [Run Jekyll on Windows guide](https://github.com/juthilo/run-jekyll-on-windows).

You may also need to install Pygments, the Python syntax highlighter for code snippets that plays nicely with Jekyll (which we use to highlight Front End source code). Read more about this in [the Jekyll docs](http://jekyllrb.com/docs/templates/#code_snippet_highlighting).

### Install NodeJS
If you've never used Node or npm before, you'll need to install Node. If you use homebrew, do:

```
brew install node
```

Otherwise, you can download and install from [here](http://nodejs.org/download/).

### Install/Update Gulp + Project Dependencies
From the directory you've checked out this repo into locally, run:

```
npm install
```

This runs through all dependencies listed in package.json and downloads them to a node_modules folder in your project directory.

**NOTE: You may need to run this more than just once (if encountering errors when running the gulp command) as new dependencies may have been added**

#### The Gulp Command
To run the version of gulp installed local to the project, in the root of your this project, run:

```
./node_modules/.bin/gulp
```

**WAT.** Why can't I just run `gulp`? Well, you could install gulp globally with `npm install -g gulp`, which will add the gulp script to your global bin folder, but it's always better to use the version that's specified in your project's package.json.  My solution to this is to simply alias `./node_modules/.bin/gulp` to `gulp`. Open up `~/.zshrc` or `~./bashrc` and add the following line:

```
alias gulp='node_modules/.bin/gulp'
```

Now, running `gulp` in the project directory will use the version specified and installed from the `package.json` file.

### Run Locally (w/ Gulp Workflow)
To view the Pattern Library locally (and to watch for any local changes to content/assets), run the `default` gulp task with:

```
gulp
```

This will run the `default` gulp task defined in `gulpfile.js`, which has the following task dependencies: `['styles', pl_styles', 'images', 'pl_images', pl_scripts, jekyll-build' 'watch']`

* The `styles` and `pl_styles` tasks compile your css files.
* `images` and `pl_images` copies images from a source folder, performs optimizations, the outputs them into the build folder
* `jekyll-build` and `jekyll-rebuild` run the local jekyll server/preview and re-process any layouts, posts, or templates changed.
* `watch` will start watching source files and will re-run the appropriate tasks when those files change.

**NOTE: some gulp tasks had to be separated to support both the pattern library 1)elements and 2)reference site UI separately.** Any task prefixed with `pl_*` refers to the reference site UI and not the elements.

### Publishing & Viewing Remotely
The most up-to-date version of the library can be viewed on our public domain, **http://ux.edx.org**

When contributing, please:

1. Make pull requests against the master branch
2. Wait for an edX UX Team member to review your contribution

**NOTE:** Merging or committing to the ``gh-pages`` branch of this repo is never a good idea. This branch is used to publish releases of the library to its public domain.

- - -

## Contributing
**NOTE**: We are currently not accepting contributions from individuals outside of edX. Once we have more progress under our belts and awareness of the standards and methods used to in this library, we'll be reaching out to more individuals for support.

If you have questions in the meantime, please email [<EMAIL>](mailto:<EMAIL>).

### Resources and Background Information
When contributing, its assumed that you're already familar with the following:

* [Our Front End Coding Styleguides](https://github.com/edx/ux-pattern-library/wiki)
* [Jekyll in General](http://jekyllrb.com/docs/home/)
* [Writing Posts in Jekyll](http://jekyllrb.com/docs/posts/)

- - -

##Heads Ups

###Pattern Library Elements vs. Reference Site UI
This repository contains both the code needed to generate pattern library elements as well as a reference site to view/learn about these elements. When and where possible, we've tried to keep the assets needed for both separate by:

* prefixing any reference site UI with `pl-*` class names in our site templates and Sass/CSS;
* containing any reference site UI within the ``_src/pl/`` directory.

- - -

## Contributors
* <NAME> (@clrux)
* <NAME> (@talbs)

{'fraction_non_alphanumeric': 0.10030185424752049, 'fraction_numerical': 0.001379905131522208, 'mean_word_length': 4.548325358851675, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7498627', 'n_tokens_mistral': 3324, 'n_tokens_neox': 3227, 'n_words': 1494}