Install Showcase.js
Showcase includes two packages, one for the CLI, and another for a React types.
Install packages
# pnpm
pnpm add @showcasejs/cli @showcasejs/react
# npm
npm i @showcasejs/cli @showcasejs/react
# yarn
yarn add @showcasejs/cli @showcasejs/reactShowcase treats react and react-dom as peer-dependencies supporting versions >=16.14.0.
Run showcase
Add a new command to your package.json scripts:
"scripts": {
"showcase": "showcase dev"
}Then run npm run showcase or yarn showcase to start the development server.
Build showcase
Add a new command to your package.json scripts:
"scripts": {
"showcase:build": "showcase build"
}Then run npm run showcase:build or yarn showcase:build to build the showcase. By default, the showcase will be built to the ./dist/showcase directory. You can change the directory in the .config file by using the build.outDir default export property.