mirror of
https://github.com/primer/css.git
synced 2024-12-22 21:51:39 +03:00
Auto building on publish, and including build dir in npm package
This commit is contained in:
parent
872a746345
commit
70d52d3379
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
|||||||
.sass-cache
|
.sass-cache
|
||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
|
_site
|
||||||
|
docs
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
*.yml
|
*.yml
|
||||||
.primer-stats.txt
|
.postcss.json
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
[31mPA[39m[33mRK[39m[32mER[39m-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)
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '5'
|
- '5'
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: npm
|
||||||
|
email: ${NPM_EMAIL}
|
||||||
|
api_key: ${NPM_API_KEY}
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
repo: ${TRAVIS_REPO_SLUG}
|
||||||
|
19
README.md
19
README.md
@ -7,10 +7,6 @@
|
|||||||
|
|
||||||
This repository is a compilation of [several CSS modules](https://github.com/primer).
|
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
|
## Install
|
||||||
|
|
||||||
This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-css` with this command.
|
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
|
## 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
|
$ 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.
|
You can read more about primer in the [docs][docs].
|
||||||
|
|
||||||
## Related
|
|
||||||
|
|
||||||
* [Primer Documentation][docs]
|
|
||||||
* [primer][primer-org]
|
|
||||||
|
|
||||||
## License
|
## 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/
|
[docs]: http://primercss.io/
|
||||||
[npm]: https://www.npmjs.com/
|
[npm]: https://www.npmjs.com/
|
||||||
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
||||||
|
16
package.json
16
package.json
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "4.0.1",
|
"version": "4.0.2",
|
||||||
"name": "primer-css",
|
"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.",
|
"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/",
|
"homepage": "http://primercss.io/",
|
||||||
@ -8,19 +8,18 @@
|
|||||||
"style": "index.scss",
|
"style": "index.scss",
|
||||||
"files": [
|
"files": [
|
||||||
"index.scss",
|
"index.scss",
|
||||||
"lib"
|
"lib",
|
||||||
|
"build"
|
||||||
],
|
],
|
||||||
"repository": "https://github.com/primer/primer.git",
|
"repository": "https://github.com/primer/primer.git",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/primer/primer/issues"
|
"url": "https://github.com/primer/primer/issues"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run setup && npm run preprocess",
|
"setup": "if [ ! -d \"node_modules\" ]; then npm install; fi",
|
||||||
"stats": "parker build/build.css > .primer-stats.txt",
|
"build": "node-sass index.scss --include-path node_modules --output-style compressed | postcss -c .postcss.json -o build/build.css",
|
||||||
"preprocess": "node-sass index.scss --include-path node_modules | postcss -c .postcss.json -o build/build.css && npm run stats",
|
"prepublish": "npm run setup && npm run build",
|
||||||
"setup": "npm install",
|
"test": "stylelint **/*.scss -c .stylelintrc.json -s scss"
|
||||||
"preversion": "npm run build",
|
|
||||||
"test": "npm run build"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"primer-alerts": "*",
|
"primer-alerts": "*",
|
||||||
@ -41,7 +40,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^6.3.6",
|
"autoprefixer": "^6.3.6",
|
||||||
"node-sass": "^3.7.0",
|
"node-sass": "^3.7.0",
|
||||||
"parker": "0.0.10",
|
|
||||||
"postcss-cli": "^2.5.2"
|
"postcss-cli": "^2.5.2"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
Reference in New Issue
Block a user