Socket
Socket
Sign inDemoInstall

primer-css

Package Overview
Dependencies
13
Maintainers
2
Versions
356
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 4.0.0

index.scss

60

package.json
{
"version": "4.0.0",
"name": "primer-css",
"version": "3.0.1",
"homepage": "http://primercss.io",
"description": "Primer is the CSS toolkit that powers GitHub's front-end design. It's purposefully limited to common components to provide our developers with the most flexibility, and to keep GitHub uniquely *GitHubby*. It's built with SCSS, so it's easy to include all or part of it within your own project.",
"homepage": "http://primercss.io/",
"author": "GitHub, Inc.",
"scss": "./scss/primer.scss",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/primer/primer.git"
},
"devDependencies": {
"autoprefixer-core": "~5.2.1",
"grunt": "^0.4.5",
"grunt-autoprefixer": "^2.2.0",
"grunt-build-control": "^0.2.2",
"grunt-jekyll": "^0.4.2",
"grunt-parker": "^0.1.3",
"grunt-sass": "^1.0.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-postcss": "^0.5.1"
},
"description": "Primer is the CSS toolkit that powers GitHub's front-end design. It's purposefully limited to common components to provide our developers with the most flexibility, and to keep GitHub uniquely *GitHubby*. It's built with SCSS and available via Bower, so it's easy to include all or part of it within your own project.",
"style": "index.scss",
"files": [
"index.scss",
"lib"
],
"repository": "https://github.com/primer/primer.git",
"bugs": {
"url": "https://github.com/primer/primer/issues"
},
"main": "css/primer.css",
"directories": {
"doc": "docs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "npm run setup && npm run preprocess",
"stats": "parker build/build.css > .primer-stats.txt",
"preprocess": "node-sass index.scss --include-path node_modules | postcss -c .postcss.json -o build/build.css && npm run stats",
"setup": "npm install",
"preversion": "npm run build",
"test": "npm run build"
},
"dependencies": {
"primer-support": "*",
"primer-utilities": "*",
"primer-base": "*",
"primer-forms": "*",
"primer-buttons": "*",
"primer-alerts": "*",
"primer-avatars": "*",
"primer-blankslate": "*",
"primer-navigation": "*",
"primer-states": "*",
"primer-tooltips": "*",
"primer-flex-table": "*",
"primer-truncate": "*"
},
"devDependencies": {
"autoprefixer": "^6.3.6",
"node-sass": "^3.7.0",
"parker": "0.0.10",
"postcss-cli": "^2.5.2"
},
"keywords": [

@@ -35,0 +47,0 @@ "primer",

148

README.md

@@ -1,151 +0,57 @@

# Primer
# Primer CSS
Primer is the CSS toolkit that powers GitHub's front-end design. It's purposefully limited to common components to provide our developers with the most flexibility, and to keep GitHub uniquely *GitHubby*. It's built with SCSS and available via Bower, so it's easy to include all or part of it within your own project.
[![NPM version](http://img.shields.io/npm/v/primer-css.svg)](https://www.npmjs.org/package/primer-css)
[![Build Status](https://travis-ci.org/primer/primer.svg?branch=master)](https://travis-ci.org/primer/primer)
[**Read the Primer documentation**](http://primercss.io) to learn more.
> Primer is the CSS toolkit that powers GitHub's front-end design. It's purposefully limited to common components to provide our developers with the most flexibility, and to keep GitHub uniquely *GitHubby*. It's built with SCSS and available via NPM, so it's easy to include all or part of it within your own project.
_**Heads up!** We love open source, but Primer is unlikely to add new features that are not used in GitHub.com. It's first and foremost our CSS toolkit. We really love to share though, so hopefully that means we're still friends <3._
This repository is a compilation of [several CSS modules](https://github.com/primer).
## Contents
## Documentation
- [Install](#install)
- [Usage](#usage)
- [Documentation](#documentation)
- [Dependencies](#dependencies)
- [Running locally](#running-locally)
- [Publishing](#publishing)
- [Primer stats](#primer-stats)
- [Updating](#updating)
- [Contributing](#contributing)
- [Versioning](#versioning)
- [License](#license)
You can read more about primer in the [docs][docs].
## Install
### Manually
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-css` with this command.
Download the [latest release](https://github.com/primer/primer/releases/latest) and copy the SCSS files over to your own project. Once your files are in place, jump to the [usage guidelines](#usage) for including Primer into your own CSS.
### Bower
```
$ bower install primer-css --save
$ npm install --save primer-css
```
### Things to know
**Hey, GitHubbers!** For GitHub.com, run `bower install` at root. Be sure to commit and push all the changes, including the `bower.json` and everything under `bower_components`.
## Usage
Once included, simply `@import` either the master SCSS file, or the individual files as you need them.
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.
```scss
// Example: All of Primer
@import "primer-css/scss/primer";
// Example: Individual files
@import "primer-css/scss/variables";
@import "primer-css/scss/mixins";
@import "primer-css/scss/base";
@import "primer-css/index.scss";
```
## Documentation
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._
Primer's documentation is built with Jekyll and published to `http://primercss.io` via the `gh-pages` branch.
## Build
### Dependencies
For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css`
You'll need the following installed:
- Latest Jekyll (minimum v2.2.0): `$ gem install jekyll`
- Latest Rouge: `$ gem install rouge`
- Latest Sass: `$ gem install sass`
- Latest Grunt CLI: `$ npm install -g grunt-cli`
- [Node.js and npm](http://nodejs.org/download/)
Chances are you have all this already if you work on `github/github` or similar projects. If you have all those set up, now you can install the dependencies:
```bash
$ npm install
$ bower install
```
### Running locally
From the Terminal, start a local Jekyll server:
```bash
$ jekyll serve
$ npm run build
```
Open a second Terminal tab to automatically recompile the Sass files, run autoprefixer, and update our [Primer stats file](#primer-stats):
## Primer stats
```bash
$ grunt watch
```
When compiling the Sass files, we will automatically generate a `.primer-stats.md` file. This is tracked in the Git repository to provide us historical and contextual information on the changes we introduce. For example, we'll know when the number of selectors or declarations rises sharply within a single change.
Alternatively, you can manually run `grunt` and `jekyll serve` when needed.
## Related
### Publishing
* [Primer Documentation][docs]
* [primer][primer-org]
Use the included Grunt task to generate and publish Primer's docs to the `gh-pages` branch.
## License
```bash
$ grunt publish
```
MIT &copy; [GitHub](https://github.com/)
This takes the `_site` directory, generates it's own Git repository there, and publishes the contents to the `gh-pages` branch here on GitHub. Changes are reflected in the hosted docs within a minute or so.
### Primer stats
When compiling or watching the Sass files, Primer will automatically generate a `.primer-stats.md` file. This is tracked in the Git repository to provide us historical and contextual information on the changes we introduce. For example, we'll know when the number of selectors or declarations rises sharply within a single change.
## Updating
Within `bower.json`, update to a new release by changing the version number that follows the `#` in the dependency URL.
```json
{
"name": "myapp",
"dependencies": {
"primer-css": "x.x.x"
}
}
```
To pull down the updated package, `cd` into `vendor/assets`, and run `bower install`.
```
$ cd vendor/assets
$ bower install
```
Check in `bower.json` and all changes under `vendor/assets/bower_components`.
## Development
Development of Primer happens in our primary branch, `master`. For stable versions, see the [releases page](https://github.com/primer/primer/releases). `master` will always be up to date with the latest changes, including those which have yet to be released.
## Contributing
By contributing to Primer, you agree to the terms presented in [this license agreement](https://cla.github.com/). *More information will be provided here soon.*
When contributing changes to Primer, be sure to do the following steps when opening a pull request:
1. Bump the version number in `bower.json` (it's purely placebo right now, but it's good habit) and `package.json`.
2. Run `grunt` and commit the changes. This compiles the SCSS to CSS so we can do basic analysis on the number of selectors, file size, etc.
In addition, please read through our [contributing guidelines](https://github.com/primer/primer/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
All HTML and CSS should conform to the [style guidelines](http://primercss.io/guidelines).
Editor preferences are available in the [editor config](https://github.com/primer/primer/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
## Versioning
For transparency into our release cycle and in striving to maintain backward compatibility, Primer is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.
## License
Created by and copyright GitHub, Inc. Released under the [MIT license](LICENSE.md).
[primer-org]: https://github.com/primer
[docs]: http://primercss.io/
[npm]: https://www.npmjs.com/
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
[sass]: http://sass-lang.com/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc