mirror of
https://github.com/primer/css.git
synced 2024-12-25 07:03:35 +03:00
add styleguide CSS + JS bundles
This commit is contained in:
parent
9f203f71f3
commit
6d9618e8c4
@ -2,7 +2,7 @@ import React from 'react'
|
||||
import Document, {Main, NextScript} from 'next/document'
|
||||
import {ServerStyleSheet} from 'styled-components'
|
||||
import {extractCritical} from 'emotion-server'
|
||||
import {config, getAssetPath} from '../src/utils'
|
||||
import {config, rootPage, getAssetPath} from '../src/utils'
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
static getInitialProps({renderPage}) {
|
||||
@ -44,6 +44,7 @@ export default class MyDocument extends Document {
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:site" content="@githubprimer" />
|
||||
<link rel="stylesheet" href={getAssetPath('github/styleguide.css')} />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href={config.production ? getAssetPath('primer.css') : '/_next/static/css/styles.chunk.css'}
|
||||
@ -53,6 +54,7 @@ export default class MyDocument extends Document {
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
<script src={getAssetPath('github/styleguide.js')} />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
12
docs/script/update-assets
Executable file
12
docs/script/update-assets
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
asset_path=./static
|
||||
|
||||
bundles="styleguide.js styleguide.css"
|
||||
|
||||
echo "Grabbing the latest assets from github.com..."
|
||||
for bundle in $bundles; do
|
||||
echo "Downloading $bundle -> $asset_path/github/$bundle ..."
|
||||
curl -fsSLo "$asset_path/github/$bundle" "https://github.com/site/assets/$bundle"
|
||||
done
|
2
docs/static/github/styleguide.css
vendored
Normal file
2
docs/static/github/styleguide.css
vendored
Normal file
File diff suppressed because one or more lines are too long
3
docs/static/github/styleguide.js
vendored
Normal file
3
docs/static/github/styleguide.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user