|
| 1 | +# Primer CSS / Branch Name |
| 2 | + |
| 3 | +[](https://www.npmjs.org/package/primer-branch-name) |
| 4 | +[](https://travis-ci.org/primer/primer-css) |
| 5 | + |
| 6 | +> A nice, consistent way to display branch names. |
| 7 | +
|
| 8 | +This repository is a module of the full [primer-css][primer-css] repository. |
| 9 | + |
| 10 | +## Install |
| 11 | + |
| 12 | +This repository is distributed with [npm]. After [installing npm][install-npm], you can install `primer-branch-name` with this command. |
| 13 | + |
| 14 | +``` |
| 15 | +$ npm install --save primer-branch-name |
| 16 | +``` |
| 17 | + |
| 18 | +## Usage |
| 19 | + |
| 20 | +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. |
| 21 | + |
| 22 | +```scss |
| 23 | +@import "primer-branch-name/index.scss"; |
| 24 | +``` |
| 25 | + |
| 26 | +You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._ |
| 27 | + |
| 28 | +## Build |
| 29 | + |
| 30 | +For a compiled **CSS** version of this module, an npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package: |
| 31 | + |
| 32 | +``` |
| 33 | +$ npm run build |
| 34 | +``` |
| 35 | + |
| 36 | +## Documentation |
| 37 | + |
| 38 | +<!-- %docs |
| 39 | +title: Branch name |
| 40 | +status: Stable |
| 41 | +--> |
| 42 | + |
| 43 | +Branch names can be a link name or not: |
| 44 | + |
| 45 | +```html |
| 46 | +<span class="branch-name">a_new_feature_branch</span> |
| 47 | +<a href="#url" class="branch-name">a_new_feature_branch</a> |
| 48 | +``` |
| 49 | + |
| 50 | +You may also include an octicon before the branch name text: |
| 51 | + |
| 52 | +```html |
| 53 | +<span class="branch-name"> |
| 54 | + <%= octicon("git-branch") width:16 height:16 %> |
| 55 | + a_new_feature_branch |
| 56 | +</span> |
| 57 | +``` |
| 58 | + |
| 59 | +<!-- %enddocs --> |
| 60 | + |
| 61 | +## License |
| 62 | + |
| 63 | +[MIT](./LICENSE) © [GitHub](https://github.com/) |
| 64 | + |
| 65 | +[primer-css]: https://github.com/primer/primer |
| 66 | +[docs]: http://primercss.io/ |
| 67 | +[npm]: https://www.npmjs.com/ |
| 68 | +[install-npm]: https://docs.npmjs.com/getting-started/installing-node |
| 69 | +[sass]: http://sass-lang.com/ |
0 commit comments