-
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from arturbien/beta
v3 release 🎉 🥳
- Loading branch information
Showing
273 changed files
with
53,598 additions
and
16,941 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
version: 2 | ||
jobs: | ||
install: | ||
docker: | ||
- image: 'circleci/node:latest' | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-npm-deps-{{ checksum "package-lock.json" }} | ||
- v1-npm-deps- | ||
- run: | ||
name: 'Install dependencies' | ||
command: npm ci | ||
- save_cache: | ||
key: v1-npm-deps-{{ checksum "package-lock.json" }} | ||
paths: | ||
- node_modules | ||
- persist_to_workspace: | ||
root: ~/repo | ||
paths: | ||
- node_modules | ||
test: | ||
docker: | ||
- image: 'circleci/node:latest' | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: 'Tests' | ||
command: npm run test:ci | ||
build-library: | ||
docker: | ||
- image: 'circleci/node:latest' | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: 'Build library' | ||
command: npm run build | ||
- persist_to_workspace: | ||
root: ~/repo | ||
paths: | ||
- dist | ||
build-storybook: | ||
docker: | ||
- image: 'circleci/node:latest' | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: 'Build Storybook' | ||
command: npm run build:storybook | ||
- persist_to_workspace: | ||
root: ~/repo | ||
paths: | ||
- storybook | ||
deploy-library: | ||
docker: | ||
- image: 'circleci/node:latest' | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: 'Deploy via Semantic Release' | ||
command: npm run semantic-release || true | ||
deploy-storybook: | ||
docker: | ||
- image: 'circleci/node:latest' | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: 'Deploy Storybook' | ||
command: ./node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN | ||
workflows: | ||
version: 2 | ||
build-and-deploy: | ||
jobs: | ||
- install | ||
- test: | ||
requires: | ||
- install | ||
- build-library: | ||
requires: | ||
- install | ||
- build-storybook: | ||
requires: | ||
- install | ||
- deploy-library: | ||
requires: | ||
- test | ||
- build-library | ||
- build-storybook | ||
- deploy-storybook: | ||
requires: | ||
- deploy-library | ||
filters: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"buildCommand": "build:prod", | ||
"sandboxes": ["react95-template-xkfj0"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BROWSER=none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "react95-storybook" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,35 @@ | ||
import { configure, addDecorator } from "@storybook/react"; | ||
import { withInfo } from "@storybook/addon-info"; | ||
import { withThemesProvider } from "storybook-addon-styled-component-theme"; | ||
import { configure, addDecorator } from '@storybook/react'; | ||
import { withThemesProvider } from 'storybook-addon-styled-component-theme'; | ||
import themes from '../src/common/themes'; | ||
import GlobalStyle from './decorators/globalStyle'; | ||
|
||
import themes from "../src/components/common/themes"; | ||
const { | ||
original, | ||
rainyDay, | ||
vaporTeal, | ||
theSixtiesUSA, | ||
olive, | ||
tokyoDark, | ||
rose, | ||
plum, | ||
matrix, | ||
travel, | ||
...otherThemes | ||
} = themes; | ||
|
||
import GlobalStyle from "./decorators/globalStyle"; | ||
const reorderedThemes = { | ||
original, | ||
rainyDay, | ||
vaporTeal, | ||
theSixtiesUSA, | ||
olive, | ||
tokyoDark, | ||
rose, | ||
plum, | ||
matrix, | ||
travel, | ||
...otherThemes | ||
}; | ||
|
||
const demoThemes = [ | ||
themes.default, | ||
themes.lilacRoseDark, | ||
themes.water, | ||
themes.coldGray, | ||
themes.violetDark | ||
]; | ||
|
||
addDecorator( | ||
withInfo({ | ||
inline: true, | ||
header: false, | ||
source: false, | ||
maxPropsIntoLine: 1, | ||
styles: stylesheet => ({ | ||
// Setting the style with a function | ||
...stylesheet, | ||
table: { | ||
background: "red" | ||
} | ||
}) | ||
}) | ||
); | ||
addDecorator(GlobalStyle); | ||
addDecorator(withThemesProvider(demoThemes)); | ||
|
||
const req = require.context("../src", true, /\.stories\.js$/); | ||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
configure(loadStories, module); | ||
addDecorator(withThemesProvider(Object.values(reorderedThemes))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
stories: [ | ||
'../src/**/*.stories.(js|mdx)', | ||
'../.storybook/**/*.stories.(js|mdx)' | ||
], | ||
addons: [ | ||
'@storybook/addon-docs', | ||
'storybook-addon-styled-component-theme/dist/register', | ||
'@storybook/addon-storysource' | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
const path = require('path'); | ||
|
||
module.exports = ({config}) => { | ||
config.module.rules.push({ | ||
test: /\.stories\.js?$/, | ||
loaders: [require.resolve('@storybook/addon-storysource/loader')], | ||
enforce: 'pre', | ||
}); | ||
module.exports = ({ config }) => { | ||
config.module.rules.push({ | ||
test: /\.stories\.js?$/, | ||
loaders: [require.resolve('@storybook/addon-storysource/loader')], | ||
enforce: 'pre' | ||
}); | ||
|
||
return config; | ||
}; | ||
config.resolve = Object.assign(config.resolve, { | ||
alias: { | ||
...config.resolve.alias, | ||
react95: path.resolve(__dirname, '../src/index') | ||
} | ||
}); | ||
|
||
return config; | ||
}; |
Oops, something went wrong.
a9fa6e9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: