1 | # GitHub Octicons
|
2 |
|
3 | [![NPM version](https://img.shields.io/npm/v/octicons.svg)](https://www.npmjs.org/package/octicons)
|
4 | [![Build Status](https://travis-ci.org/primer/octicons.svg?branch=master)](https://travis-ci.org/primer/octicons)
|
5 |
|
6 | > Octicons are a scalable set of icons handcrafted with <3 by GitHub.
|
7 |
|
8 | ## Install
|
9 |
|
10 |
|
11 | #### NPM
|
12 |
|
13 | This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `octicons` with this command.
|
14 |
|
15 | ```
|
16 | $ npm install --save octicons
|
17 | ```
|
18 |
|
19 | ## Usage
|
20 |
|
21 | The source files included are written in [Sass][sass] (`scss`) You can simply point your sass `include-path` at your `node_modules` directory and import it like this.
|
22 |
|
23 | ```scss
|
24 | @import "octicons/index.scss";
|
25 | ```
|
26 |
|
27 | ## Changing, adding, or deleting icons
|
28 |
|
29 | 1. Open the [Sketch document][sketch-document] in `/lib/`. Each icon exists as an artboard within our master Sketch document. If you’re adding an icon, duplicate one of the artboards and add your shapes to it. Be sure to give your artboard a name that makes sense.
|
30 | 2. Once you’re happy with your icon set, choose File > Export…
|
31 | 3. Choose all the artboards you’d like to export and then press “Export”
|
32 | 4. Export to `/lib/svg/`
|
33 |
|
34 | You’ll next need to build your Octicons.
|
35 |
|
36 | ## Building Octicons
|
37 |
|
38 | All the files you need will be in the `/build/` directory already, but if you’ve made changes to the `/lib/` directory and need to regenerate, follow these steps:
|
39 |
|
40 | 1. Open the Octicons directory in Terminal
|
41 | 2. Run the command `script/bootstrap`. This will install any necessary dependencies for generating the Octicons font and SVGs.
|
42 | 3. Run the command `grunt`. Running the grunt task will generate the font and SVGs, placing them in the `/build/` directory.
|
43 |
|
44 | ## License
|
45 |
|
46 | (c) 2012-2016 GitHub, Inc.
|
47 |
|
48 | When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).
|
49 |
|
50 | _Font License:_ [SIL OFL 1.1](http://scripts.sil.org/OFL)
|
51 | Applies to all font files and SVG files
|
52 |
|
53 | _Code License:_ [MIT](./LICENSE)
|
54 | Applies to all other files
|
55 |
|
56 | [primer]: https://github.com/primer/primer
|
57 | [docs]: http://primercss.io/
|
58 | [npm]: https://www.npmjs.com/
|
59 | [install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
60 | [sass]: http://sass-lang.com/
|
61 | [sketch-document]: https://github.com/primer/octicons/blob/master/lib/octicons-master.sketch
|