1
1
mirror of https://github.com/primer/css.git synced 2024-09-17 11:37:23 +03:00

Auto building on publish, and including build dir in npm package

This commit is contained in:
Jon Rohan 2016-06-02 09:39:45 -04:00
parent 872a746345
commit 70d52d3379
6 changed files with 24 additions and 43 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
.sass-cache
node_modules
build
_site
docs

View File

@ -1,2 +1,2 @@
*.yml
.primer-stats.txt
.postcss.json

View File

@ -1,19 +0,0 @@
PARKER-JS
Total Stylesheets: 1
Total Stylesheet Size: 57139
Total Rules: 596
Total Selectors: 780
Total Identifiers: 1426
Total Declarations: 1302
Selectors Per Rule: 1.308724832214765
Identifiers Per Selector: 1.8205128205128205
Specificity Per Selector: 14.517948717948718
Top Selector Specificity: 40
Top Selector Specificity Selector: .btn-group .btn-group-form:first-child .btn
Total Id Selectors: 0
Total Unique Colors: 76
Unique Colors: #FFFF00,#000000,#C0C0C0,#333333,#FFFFFF,#4078C0,#DDDDDD,#E5E5E5,#C5D5DD,#EEEEEE,#F2F8FA,#F5F5F5,#FAFAFA,#6CC644,#BD2C00,#999999,#767676,#55A532,#C9510C,#6E5494,#FFFA5D,#CEA61B,#555555,#51A7E8,#FFFBDC,#666666,#4C4A42,#FFF9EA,#DFD8C2,#991111,#FCDEDE,#D2B2B2,#CCCCCC,#C9FF00,#CACACA,#BBBBBB,#FCFCFC,#D5D5D5,#DCDCDC,#B5B5B5,#CFCFCF,#60B044,#8ADD6D,#5CA941,#569E3D,#79D858,#4A993E,#418737,#4C8B36,#FEFEFE,#ADD39F,#C3ECB4,#B9DCAC,#A7C89B,#990000,#B33630,#DC5F59,#CD504A,#9F312C,#9F302B,#CB7F7F,#EFEFEF,#E1E1E1,#396CAD,#4183C4,#224466,#E2EEF9,#BAC6D3,#FFFCCC,#AAAAAA,#D8D8D8,#F9F9F9,#222222,#D26911,#F7F7F7,#F1F1F1
Total Important Keywords: 196
Total Media Queries: 7
Media Queries: only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-moz-min-device-pixel-ratio: 2),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx),screen and (min-width: 0\0)

View File

@ -1,3 +1,12 @@
language: node_js
node_js:
- '5'
deploy:
provider: npm
email: ${NPM_EMAIL}
api_key: ${NPM_API_KEY}
skip_cleanup: true
on:
branch: master
repo: ${TRAVIS_REPO_SLUG}

View File

@ -7,10 +7,6 @@
This repository is a compilation of [several CSS modules](https://github.com/primer).
## Documentation
You can read more about primer in the [docs][docs].
## Install
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-css` with this command.
@ -31,26 +27,21 @@ You can also import specific portions of the module by importing those partials
## Build
For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css`
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.
```
$ npm run build
```
## Primer stats
## Documentation
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.
## Related
* [Primer Documentation][docs]
* [primer][primer-org]
You can read more about primer in the [docs][docs].
## License
MIT © [GitHub](https://github.com/)
[MIT](./LICENSE) © [GitHub](https://github.com/)
[primer-org]: https://github.com/primer
[primer]: https://github.com/primer/primer
[docs]: http://primercss.io/
[npm]: https://www.npmjs.com/
[install-npm]: https://docs.npmjs.com/getting-started/installing-node

View File

@ -1,5 +1,5 @@
{
"version": "4.0.1",
"version": "4.0.2",
"name": "primer-css",
"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/",
@ -8,19 +8,18 @@
"style": "index.scss",
"files": [
"index.scss",
"lib"
"lib",
"build"
],
"repository": "https://github.com/primer/primer.git",
"bugs": {
"url": "https://github.com/primer/primer/issues"
},
"scripts": {
"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"
"setup": "if [ ! -d \"node_modules\" ]; then npm install; fi",
"build": "node-sass index.scss --include-path node_modules --output-style compressed | postcss -c .postcss.json -o build/build.css",
"prepublish": "npm run setup && npm run build",
"test": "stylelint **/*.scss -c .stylelintrc.json -s scss"
},
"dependencies": {
"primer-alerts": "*",
@ -41,7 +40,6 @@
"devDependencies": {
"autoprefixer": "^6.3.6",
"node-sass": "^3.7.0",
"parker": "0.0.10",
"postcss-cli": "^2.5.2"
},
"keywords": [