Skip to content

Commit 19b8fca

Browse files
authored
Merge pull request #972 from primer/variables-page
Variables page
2 parents f2289ff + 1dbbf81 commit 19b8fca

File tree

10 files changed

+294
-30
lines changed

10 files changed

+294
-30
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
*.log
22
*.tgz
33
.DS_Store
4-
.changelog
4+
.cache/
5+
.changelog/
56
.next/
67
.sass-cache
7-
.stylelintcache
88
.storybuild/
9+
.stylelintcache
910
_site
1011
dist/
12+
docs/dist
1113
node_modules/
12-
searchIndex.js
13-
.cache/
1414
public/
15+
searchIndex.js

.nowignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.*.sw?
2+
.changelog/
3+
dist/
4+
docs/dist
5+
docs/public/

docs/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@
1313
"react": {
1414
"version": "detect"
1515
}
16+
},
17+
"globals": {
18+
"__DEV__": "readonly"
1619
}
1720
}

docs/content/support/variables.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Variables
3+
path: support/variables
4+
status: Experimental
5+
bundle: alerts
6+
---
7+
8+
import {Variables, DeprecationIcon} from '../../src/variables'
9+
10+
<Variables>
11+
12+
The tables below list all of the global SCSS variables defined in [the `support/variables` directory](https://github.com/primer/css/tree/master/src/support/variables).
13+
14+
Variables with a <DeprecationIcon /> are planned for [deprecation](../tools/deprecations) in a future version of `@primer/css`, and should be avoided.
15+
16+
</Variables>

docs/gatsby-node.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
exports.onCreateWebpackConfig = ({actions, stage, plugins}) => {
2+
actions.setWebpackConfig({
3+
node: {
4+
fs: 'empty'
5+
},
6+
plugins: [
7+
plugins.define({
8+
__DEV__: stage === 'develop' || stage === 'develop-html'
9+
})
10+
]
11+
})
12+
}

docs/package-lock.json

Lines changed: 25 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
{
2-
"name": "docs",
32
"private": true,
4-
"version": "1.0.0",
5-
"license": "MIT",
3+
"name": "docs",
4+
"repository": "primer/css",
65
"scripts": {
76
"clean": "gatsby clean",
8-
"develop": "gatsby develop -H 0.0.0.0",
9-
"build": "gatsby build --prefix-paths",
10-
"now-build": "npm run build"
7+
"develop": "ln -sf ../dist . && gatsby develop -H 0.0.0.0",
8+
"build-content": "gatsby build --prefix-paths",
9+
"build": "./script/now-build.sh"
1110
},
1211
"dependencies": {
1312
"@loadable/component": "^5.10.2",
1413
"@primer/components": "^13.2.0",
15-
"@primer/css": "^12.4.1",
1614
"@primer/gatsby-theme-doctocat": "^0.15.0",
1715
"@primer/octicons": "^9.1.1",
1816
"@primer/octicons-react": "^9.1.1",
@@ -36,5 +34,7 @@
3634
"styled-components": "^4.3.2",
3735
"title-case": "^2.1.1"
3836
},
39-
"repository": "primer/css"
37+
"engines": {
38+
"node": "12.x"
39+
}
4040
}

docs/script/now-build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash -e
2+
3+
# Build the base project so we can pull out the JSON data
4+
cd ..
5+
npm ci
6+
npm run dist
7+
cp -rf dist docs
8+
9+
# Now build the docs site using that data
10+
cd docs
11+
npm ci
12+
CI=true npm run build-content

docs/src/@primer/gatsby-theme-doctocat/nav.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
url: /support/typography
1717
- title: Marketing support
1818
url: /support/marketing-variables
19+
- title: Variables
20+
url: /support/variables
1921
- title: Utilities
2022
url: /utilities
2123
children:

0 commit comments

Comments
 (0)