File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
packages/react/.storybook Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ 'use strict'
2+
3+ const { DEPLOY_ENV = 'development' } = process . env
4+
15/**
26 * @type {import('@storybook/core-common').StorybookConfig }
37 */
@@ -53,4 +57,16 @@ module.exports = {
5357 typescript : {
5458 reactDocgen : 'react-docgen' ,
5559 } ,
60+ previewHead : head => {
61+ if ( DEPLOY_ENV === 'development' ) {
62+ return head
63+ }
64+ return `${ head } \n<meta name="ha-url" content="https://collector.githubapp.com/primer/collect">`
65+ } ,
66+ previewBody : body => {
67+ if ( DEPLOY_ENV === 'development' ) {
68+ return body
69+ }
70+ return `${ body } \n<script src="https://analytics.githubassets.com/hydro-marketing.min.js"></script>`
71+ } ,
5672}
Original file line number Diff line number Diff line change 22set -e
33
44if [ -n " $1 " ]; then
5+ export DEPLOY_ENV=" preview"
56 npm run build:preview -w docs
67 npm run build:storybook preview
78else
9+ export DEPLOY_ENV=" production"
810 npm run build -w docs
911 npm run build:storybook
1012fi
You can’t perform that action at this time.
0 commit comments