1
1
mirror of https://github.com/primer/css.git synced 2024-12-01 04:21:12 +03:00

Merge branch 'master' into brocs/devdep

This commit is contained in:
Diana Mounter 2017-06-28 15:23:44 -07:00 committed by GitHub
commit 6d81fab1d8

View File

@ -22,25 +22,42 @@ The Primer CSS repo is managed as a monorepo that is composed of many npm packag
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-css` with this command.
```
```sh
$ npm install --save primer-css
```
## Usage
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.
The source files included are written in [Sass][sass] (SCSS). You can point your Sass `include-path` at your project's `node_modules` directory and import it like this:
```scss
@import "primer-css/index.scss";
```
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._
You can import individual Primer modules by installing them each with npm, for instance:
```sh
$ npm install --save primer-navigation
```
Then, you would import the module with:
```scss
@import "primer-navigation/index.scss";
```
Or, while you're figuring out which modules you need, you can import them directly from the `primer-css` [`packages` directory](./packages) like so:
```scss
@import "primer-css/packages/primer-navigation/index.css";
```
## Build
For a compiled **CSS** version of this module, a 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.
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.
```
```sh
$ npm run build
```