<commit_before># Paper.js - The Swiss Army Knife of Vector Graphics Scripting

If you want to work with Paper.js, simply download the latest "stable" version from [http://paperjs.org/download/](http://paperjs.org/download/)

- Website: <http://paperjs.org/>
- Discussion forum: <http://groups.google.com/group/paperjs>
- Mainline source code: <https://github.com/paperjs/paper.js>
- Twitter: [@paperjs](http://twitter.com/paperjs)
- Daily development builds: <http://paperjs.org/download/>

## Installing Paper.js

You can download prebuilt packages from <http://paperjs.org/download/>.

As of July 2013, the recommended way to install and maintain Paper.js is through Bower for browsers, and through NPM for Node.js.

For OSX see <http://madebyhoundstooth.com/blog/install-node-with-homebrew-on-os-x/> for a tutorial explaining how to install Node.js, NPM and Bower.

For Linux see <http://nodejs.org/download/> to locate 32-bit and 64-bit nodejs binaries as well as sources. It is recommended that you download directly from the nodejs site; the version available via many OS-supplied package managers is out-of-date and doesn't work with many of the packages paper uses. NPM is now included with the nodejs distribution. Once nodejs (with npm) has been installed you can install bower using the following command:

    npm install -g bower

With Bower installed, simply type this command in your project folder:

    bower install paper

Upon execution, you will find a `paper` folder inside the project's `bower_components` folder. For more information on Bower and to learn about its features for dependence tracking, see <http://bower.io/>.

## Which Version to Use?

The various distributions come with three different pre-build versions of Paper.js, in minified and normal variants:

- `paper-full.js` – The full version for the browser, including PaperScript support and Acorn.js
- `paper-core.js` – The core version for the browser, without PaperScript support nor Acorn.js. Use this to shave off some bytes when working with JavaScript directly.
- `paper-node.js` – The version for Node.js. It is recommended to install this through NPM, see below.

## Installing Paper.js for Node.js through NPM

You can also use NPM to install Paper.js for Node.js. But before doing so, you need the Cairo Graphics library installed, see <http://cairographics.org/>.

**Installing Cairo on OSX:**

The easiest way to install Cairo is install Homebrew <http://mxcl.github.io/homebrew/> then issue the command:

    brew install cairo

Note that currently there is an issue on OSX with Cairo. If the above causes errors, the following will most likely fix it:

    PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ npm install paper

Also, whenever you would like to update the modules, you will need to execute:

    PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ npm update

**Installing Cairo on Debian/Ubuntu Linux:**

    sudo apt-get install libcairo2-dev

You might also need these additional packages if you don't usually build from c++ sources:

    sudo apt-get install build-essential libssl-dev libjpeg8-dev libgif-dev

**After Cairo has been installed:**

You should now be able to install the Paper.js module from NPM:

    npm install paper

## Development

**Get the source (for building):**

    git clone --recursive git://github.com/paperjs/paper.js.git

**Get the source (for contributing):**

If you want to contribute to the project you will have to [make a fork](http://help.github.com/forking/). Then do this:

    git clone --recursive git@github.com:yourusername/paper.js.git
    cd paper.js
    git remote add upstream git://github.com/paperjs/paper.js.git

### Refreshing Your Clone

To fetch changes from origin (your fork), run

    git fetch origin

If you are working with a fork and would like to fetch from upstream, run

    git fetch upstream<commit_msg>Updat README for latest version of node-canvas<commit_after># Paper.js - The Swiss Army Knife of Vector Graphics Scripting

If you want to work with Paper.js, simply download the latest "stable" version from [http://paperjs.org/download/](http://paperjs.org/download/)

- Website: <http://paperjs.org/>
- Discussion forum: <http://groups.google.com/group/paperjs>
- Mainline source code: <https://github.com/paperjs/paper.js>
- Twitter: [@paperjs](http://twitter.com/paperjs)
- Daily development builds: <http://paperjs.org/download/>

## Installing Paper.js

You can download prebuilt packages from <http://paperjs.org/download/>.

As of July 2013, the recommended way to install and maintain Paper.js is through Bower for browsers, and through NPM for Node.js.

For OSX see <http://madebyhoundstooth.com/blog/install-node-with-homebrew-on-os-x/> for a tutorial explaining how to install Node.js, NPM and Bower.

For Linux see <http://nodejs.org/download/> to locate 32-bit and 64-bit nodejs binaries as well as sources. It is recommended that you download directly from the nodejs site; the version available via many OS-supplied package managers is out-of-date and doesn't work with many of the packages paper uses. NPM is now included with the nodejs distribution. Once nodejs (with npm) has been installed you can install bower using the following command:

    npm install -g bower

With Bower installed, simply type this command in your project folder:

    bower install paper

Upon execution, you will find a `paper` folder inside the project's `bower_components` folder. For more information on Bower and to learn about its features for dependence tracking, see <http://bower.io/>.

## Which Version to Use?

The various distributions come with three different pre-build versions of Paper.js, in minified and normal variants:

- `paper-full.js` – The full version for the browser, including PaperScript support and Acorn.js
- `paper-core.js` – The core version for the browser, without PaperScript support nor Acorn.js. Use this to shave off some bytes when working with JavaScript directly.
- `paper-node.js` – The version for Node.js. It is recommended to install this through NPM, see below.

## Installing Paper.js for Node.js through NPM

You can also use NPM to install Paper.js for Node.js. But before doing so, you need the Cairo Graphics library installed, see <http://cairographics.org/>.

**Installing Cairo and Pango on OSX:**

The easiest way to install Cairo is install Homebrew <http://mxcl.github.io/homebrew/> then issue the command:

    brew install cairo pango

Note that currently there is an issue on OSX with Cairo. If the above causes errors, the following will most likely fix it:

    PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ npm install paper

Also, whenever you would like to update the modules, you will need to execute:

    PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ npm update

**Installing Cairo, Pango and all other dependencies on Debian/Ubuntu Linux:**

    sudo apt-get install libcairo2-dev libpango1.0-dev libssl-dev libjpeg62-dev libgif-dev

You might also need to install the build-essential package if you don't usually build from c++ sources:

    sudo apt-get install build-essential

**After Cairo has been installed:**

You should now be able to install the Paper.js module from NPM:

    npm install paper

## Development

**Get the source (for building):**

    git clone --recursive git://github.com/paperjs/paper.js.git

**Get the source (for contributing):**

If you want to contribute to the project you will have to [make a fork](http://help.github.com/forking/). Then do this:

    git clone --recursive <EMAIL>@github.com:yourusername/paper.js.git
    cd paper.js
    git remote add upstream git://github.com/paperjs/paper.js.git

### Refreshing Your Clone

To fetch changes from origin (your fork), run

    git fetch origin

If you are working with a fork and would like to fetch from upstream, run

    git fetch upstream
{'fraction_non_alphanumeric': 0.08391697440468611, 'fraction_numerical': 0.003947535973513307, 'mean_word_length': 3.9771863117870723, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4342878', 'n_tokens_mistral': 2265, 'n_tokens_neox': 2135, 'n_words': 1010}