-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Monorepo README updates #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f61010d
ed15742
b9c128e
3457e98
fa2fe39
2940be6
519e44a
e52c36d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can fix that one the new release pr.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed here: 59fea15 |
||
|
|
||
| ## Build | ||
| ```sh | ||
| $ npm install --save primer-navigation | ||
| ``` | ||
|
|
||
| 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. | ||
| 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, 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 | ||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have this provided already with the
website-starterrepo, but others might not know whatinclude-pathis. Can we give context on this for Jekyll, or link to an example?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Can we link to a URL about Sass include paths more generally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mdo. @shawnbot Would you be down to open a new pr? This doesn't have to hold up the new release today, but should be added.