Skip to content
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

Core/storybook minor fixes #1292

Merged
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
8 changes: 8 additions & 0 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
"allowWarningsInSuccessfulBuild": true,
"shellCommand": "cd packages/core && rushx start"
},
{
"commandKind": "global",
"name": "build:core",
"summary": "Runs 'rushx build' for the core storybook site package.",
"safeForSimultaneousRushProcesses": true,
"allowWarningsInSuccessfulBuild": true,
"shellCommand": "cd packages/core && rushx build"
},
{
"commandKind": "global",
"name": "backstop:react",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
!.env

storybook-static
1 change: 0 additions & 1 deletion packages/core/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const path = require('path');
const assets = require('@massds/mayflower-assets');
const nodeModules = path.resolve(path.join(process.cwd(), 'node_modules'));
const pnpmNodeModules = path.join(nodeModules, '.pnpm', 'node_modules');
console.log(path.resolve(nodeModules, '@massds/mayflower-react/dist/styles'))

module.exports = {
"stories": [
Expand Down
7 changes: 5 additions & 2 deletions packages/core/.storybook/mayflowerTheme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { create } from '@storybook/theming/create';
import logo from './mayflower-logo.png';

const { VERSION } = process.env;

export default create({
base: 'light',

Expand Down Expand Up @@ -30,7 +33,7 @@ export default create({
inputTextColor: '#141414',
inputBorderRadius: 4,

brandTitle: 'Mayflower React',
brandUrl: 'https://github.com/massgov/mayflower',
brandTitle: `Mayflower Design System ${VERSION}`,
brandUrl: '/',
brandImage: logo,
});
5 changes: 1 addition & 4 deletions packages/core/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,5 @@ export const parameters = {
previewTabs: {
canvas: { hidden: true }
},
viewMode: 'docs',
docs: {
theme: mayflowerTheme,
}
viewMode: 'docs'
}
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"storybook": "start-storybook -p 6006 --docs",
"build-storybook": "build-storybook --docs",
"storybook": "start-storybook -p 6006 --docs --no-manager-cache",
"build": "build-storybook --docs",
"start": "rushx storybook",
"chromatic": "npx chromatic --project-token engf6vhuiv"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/core/stories/about/Examples.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ This is a curated list of Mayflower projects for your inspiration.

## Digital Services team:
Projects that are developed or maintained by the Digital Services team
- [(Experimental) Mayflower React](mayflower.digital.mass.gov/react): A React Component Library
- [(Experimental) Mayflower Patternlab](mayflower.digital.mass.gov/react): A Twig Component Library
- [Mass.gov](mass.gov): The official government website for the Commonwealth of Massachusetts
- [(Experimental) Mayflower React](https://mayflower.digital.mass.gov/react): A React Component Library
- [(Experimental) Mayflower Patternlab](https://mayflower.digital.mass.gov/patternlab): A Twig Component Library
- [Mass.gov](https://www.mass.gov/): The official government website for the Commonwealth of Massachusetts

<br />

Expand Down