Des2Code Code Import
Storybook component and variation importer. See the usage guide for prerequisites, screenshots, configuration, and import options.
Requires Node.js 22+ and Playwright installed in the project. Install undici when using --connect-to.
Copy this folder, including .env.example, into the frontend project root as des2code-code-import/.
# From the frontend project root:
cp des2code-code-import/.env.example des2code-code-import/.env
node des2code-code-import/import.mjs --help
Set the backend URL, organization, project, and user access token in des2code-code-import/.env. Screenshots and reports are saved to des2code-code-import/output/ by default.
# Validate source discovery with an existing screenshot manifest; no API writes.
node des2code-code-import/import.mjs \
--dry-run --reuse-manifest des2code-code-import/output/screenshots/manifest.json
# Unit tests.
node --test des2code-code-import/__tests__/*.test.mjs
Import does not rebuild the code index. After component and variation processing finishes, queue it separately: