Skip to content

Commit

Permalink
[docs-infra] Allow developers to build their CodeSandbox export
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 31, 2024
1 parent fb2cb7f commit 0426040
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions docs/src/modules/sandbox/CodeSandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ const createReactApp = (demoData: DemoData) => {
description,
dependencies,
devDependencies,
scripts: {
start: 'react-scripts start',
build: 'react-scripts build',
test: 'react-scripts test',
eject: 'react-scripts ejec',
},
...(demoData.codeVariant === 'TS' && {
main: 'index.tsx',
scripts: {
start: 'react-scripts start',
},
}),
},
};
Expand Down Expand Up @@ -155,11 +158,14 @@ ReactDOM.createRoot(document.querySelector("#root")${type}).render(
description,
dependencies,
devDependencies,
scripts: {
start: 'react-scripts start',
build: 'react-scripts build',
test: 'react-scripts test',
eject: 'react-scripts ejec',
},
...(templateData.codeVariant === 'TS' && {
main: 'index.tsx',
scripts: {
start: 'react-scripts start',
},
}),
},
};
Expand Down

0 comments on commit 0426040

Please sign in to comment.