Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d744d35
add variables nav item
shawnbot Nov 1, 2019
6b5fa25
add Variables table :sparkles:
shawnbot Nov 1, 2019
a4fa7f8
run dist up a directory in now-build?
shawnbot Nov 1, 2019
dcb7732
get variables from primer dependency
shawnbot Nov 1, 2019
f169512
nix prebuild script; use canary release of primer/css
shawnbot Nov 1, 2019
86015fd
import primer/css stuff from ../..
shawnbot Nov 4, 2019
bbf42f2
nix @primer/css dep, run dist up a dir
shawnbot Nov 4, 2019
21684ca
run now-build.sh
shawnbot Nov 4, 2019
86abe02
get variable deprecations from json
shawnbot Nov 4, 2019
d428c9b
use /package.json for now
shawnbot Nov 4, 2019
cfad20f
add .nowignore
shawnbot Nov 4, 2019
4abb5c6
move now-build.sh up to /script, etc.
shawnbot Nov 4, 2019
016135b
update docs/package-lock.json, npm audit fix
shawnbot Nov 14, 2019
ce25511
Rename now-build script to build
BinaryMuse Dec 16, 2019
1133f96
Add Node 12.x to docs/ engines
BinaryMuse Dec 16, 2019
334bc16
Move now-build.sh to docs folder
BinaryMuse Dec 16, 2019
ccab5da
Revert now.json changes
BinaryMuse Dec 16, 2019
a8d6fba
Finish up Variables page
BinaryMuse Dec 16, 2019
22c778f
Variables page cleanup and linting
BinaryMuse Dec 16, 2019
e7b10d2
:art:
BinaryMuse Dec 16, 2019
ae108fb
Merge remote-tracking branch 'origin/master' into variables-page
BinaryMuse Dec 16, 2019
aff87ba
Remove unused imports
BinaryMuse Dec 16, 2019
5a3d18a
Improve error in dev mode when no variables exist
BinaryMuse Dec 16, 2019
1dbbf81
Don't repeat explanatory text
BinaryMuse Dec 17, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
*.log
*.tgz
.DS_Store
.changelog
.cache/
.changelog/
.next/
.sass-cache
.stylelintcache
.storybuild/
.stylelintcache
_site
dist/
docs/dist
node_modules/
searchIndex.js
.cache/
public/
searchIndex.js
5 changes: 5 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.*.sw?
.changelog/
dist/
docs/dist
docs/public/
3 changes: 3 additions & 0 deletions docs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"react": {
"version": "detect"
}
},
"globals": {
"__DEV__": "readonly"
}
}
16 changes: 16 additions & 0 deletions docs/content/support/variables.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Variables
path: support/variables
status: Experimental
bundle: alerts
---

import {Variables, DeprecationIcon} from '../../src/variables'

<Variables>

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).

Variables with a <DeprecationIcon /> are planned for [deprecation](../tools/deprecations) in a future version of `@primer/css`, and should be avoided.

</Variables>
12 changes: 12 additions & 0 deletions docs/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exports.onCreateWebpackConfig = ({actions, stage, plugins}) => {
actions.setWebpackConfig({
node: {
fs: 'empty'
},
plugins: [
plugins.define({
__DEV__: stage === 'develop' || stage === 'develop-html'
})
]
})
}
43 changes: 25 additions & 18 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"name": "docs",
"private": true,
"version": "1.0.0",
"license": "MIT",
"name": "docs",
"repository": "primer/css",
"scripts": {
"clean": "gatsby clean",
"develop": "gatsby develop -H 0.0.0.0",
"build": "gatsby build --prefix-paths",
"now-build": "npm run build"
"develop": "ln -sf ../dist . && gatsby develop -H 0.0.0.0",
"build-content": "gatsby build --prefix-paths",
"build": "./script/now-build.sh"
},
"dependencies": {
"@loadable/component": "^5.10.2",
"@primer/components": "^13.2.0",
"@primer/css": "^12.4.1",
"@primer/gatsby-theme-doctocat": "^0.15.0",
"@primer/octicons": "^9.1.1",
"@primer/octicons-react": "^9.1.1",
Expand All @@ -36,5 +34,7 @@
"styled-components": "^4.3.2",
"title-case": "^2.1.1"
},
"repository": "primer/css"
"engines": {
"node": "12.x"
}
}
12 changes: 12 additions & 0 deletions docs/script/now-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -e

# Build the base project so we can pull out the JSON data
cd ..
npm ci
npm run dist
cp -rf dist docs

# Now build the docs site using that data
cd docs
npm ci
CI=true npm run build-content
2 changes: 2 additions & 0 deletions docs/src/@primer/gatsby-theme-doctocat/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
url: /support/typography
- title: Marketing support
url: /support/marketing-variables
- title: Variables
url: /support/variables
- title: Utilities
url: /utilities
children:
Expand Down
Loading