Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@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:
improt { 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 2,348,368 weekly downloads. As such, @storybook/postinstall popularity was classified as popular.
We found that @storybook/postinstall demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.