
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
@storybook/postinstall
Advanced tools
A minimal utility library for addons to update project configurations after the addon is installed via the Storybook CLI, e.g. sb add docs.
Each postinstall is written as a jscodeshift codemod, with the naming convention addon-name/postinstall/<file>.js where file is one of { config, addons, presets }.
If these files are present in the addon, the CLI will run them on the existing file in the user's project (or create a new empty file if one doesn't exist). This library exists to make it really easy to make common modifications without having to muck with jscodeshift internals.
To add a preset to presets.js, simply create a file postinstall/presets.js in your addon:
import { presetsAddPreset } = require('@storybook/postinstall');
export default function transformer(file, api) {
const root = api.jscodeshift(file.source);
presetsAddPreset(`@storybook/addon-docs/preset`, { some: 'options' }, { root, api });
return root.toSource();
};
FAQs
Storybook addons postinstall utilities
The npm package @storybook/postinstall receives a total of 1,202,284 weekly downloads. As such, @storybook/postinstall popularity was classified as popular.
We found that @storybook/postinstall demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.