Skip to content

Fix staging deployment with now #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"start": "react-scripts start",
"prebuild": "cd ../react-ui && yarn build",
"build": "react-scripts build",
"now-start": "serve -s build",
"css": "theme.css"
Expand Down
34 changes: 20 additions & 14 deletions packages/docs/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
Text,
Menu,
calc,
merge
merge,
version
} from 'react-ui'

import * as base from 'react-ui/themes/base'
Expand Down Expand Up @@ -70,19 +71,24 @@ const App = () => {
>
<MenuIcon />
</Button>
<Menu>
<Menu.Button variant="link" style={{ paddingRight: 1 }}>
<Text marginRight={1} css={{ textTransform: 'capitalize' }}>
Theme: {theme}
</Text>
{chevron}
</Menu.Button>
<Menu.List>
<Menu.Item onSelect={_ => setTheme('base')}>Base</Menu.Item>
<Menu.Item onSelect={_ => setTheme('light')}>Light</Menu.Item>
<Menu.Item onSelect={_ => setTheme('dark')}>Dark</Menu.Item>
</Menu.List>
</Menu>
<div>
<Text variant="subtle" size={3}>
v{version}
</Text>
<Menu>
<Menu.Button variant="link" style={{ paddingRight: 1 }}>
<Text marginRight={1} css={{ textTransform: 'capitalize' }}>
Theme: {theme}
</Text>
{chevron}
</Menu.Button>
<Menu.List>
<Menu.Item onSelect={_ => setTheme('base')}>Base</Menu.Item>
<Menu.Item onSelect={_ => setTheme('light')}>Light</Menu.Item>
<Menu.Item onSelect={_ => setTheme('dark')}>Dark</Menu.Item>
</Menu.List>
</Menu>
</div>
</Stack>
<Grid
css={{
Expand Down
4 changes: 4 additions & 0 deletions packages/react-ui/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { version } from './package.json'

export * from './src/components/avatar'
export * from './src/components/button'
export * from './src/components/heading'
Expand All @@ -23,3 +25,5 @@ export * from './src/components/theme-provider'

export { Element } from './src/primitives'
export { merge, mergeFns, calc } from './src/utils'

export { version }
1 change: 1 addition & 0 deletions packages/react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"rollup": "^1.27.8",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-peer-deps-external": "^2.2.0"
},
Expand Down
10 changes: 6 additions & 4 deletions packages/react-ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'
import external from 'rollup-plugin-peer-deps-external'
import json from 'rollup-plugin-json'

import pkg from './package.json'

Expand All @@ -14,7 +15,8 @@ const plugins = [
presets: [['@babel/preset-env', { modules: false }], '@babel/preset-react'],
exclude: 'node_modules/**'
}),
commonjs()
commonjs(),
json()
]

export default [
Expand All @@ -29,13 +31,13 @@ export default [
{
dir: 'dist/themes/',
format: 'cjs',
exports: 'named',
exports: 'named'
},
{
dir: 'themes',
format: 'cjs',
exports: 'named',
},
exports: 'named'
}
],
plugins
}
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12910,6 +12910,13 @@ rollup-plugin-commonjs@^10.1.0:
resolve "^1.11.0"
rollup-pluginutils "^2.8.1"

rollup-plugin-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e"
integrity sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow==
dependencies:
rollup-pluginutils "^2.5.0"

rollup-plugin-node-resolve@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523"
Expand All @@ -12926,7 +12933,7 @@ rollup-plugin-peer-deps-external@^2.2.0:
resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.2.tgz#506cef67fb68f41cca3ec08ca6ff7936b190f568"
integrity sha512-XcHH4UW9exRTAf73d8rk2dw2UgF//cWbilhRI4Ni/n+t0zA1eBtohKyJROn0fxa4/+WZ5R3onAyIDiwRQL+59A==

rollup-pluginutils@^2.8.1:
rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.8.1:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
Expand Down