Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@storybook/core-server
Advanced tools
The @storybook/core-server npm package is part of the Storybook ecosystem, which is a tool for developing UI components in isolation for React, Vue, Angular, and more. It allows developers to serve and manage Storybook instances in a Node.js environment. With this package, you can start a Storybook server, build a static version of Storybook for deployment, and customize various aspects of the Storybook instance.
Starting a Storybook server
This code sample demonstrates how to start a Storybook server on port 6006 using the configuration from the '.storybook' directory.
const { buildDevStandalone } = require('@storybook/core-server');
buildDevStandalone({
port: 6006,
configDir: './.storybook'
}).catch(error => {
console.error(error);
process.exit(1);
});
Building a static Storybook
This code sample shows how to build a static version of Storybook that can be deployed to a web server. The output will be placed in the 'storybook-static' directory.
const { buildStatic } = require('@storybook/core-server');
buildStatic({
staticDir: './public',
configDir: './.storybook',
outputDir: './storybook-static'
}).catch(error => {
console.error(error);
process.exit(1);
});
Customizing Storybook's Webpack configuration
This code sample is typically placed in a '.storybook/main.js' file and demonstrates how to customize Storybook's Webpack configuration using the 'webpackFinal' method.
module.exports = {
stories: ['../src/**/*.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
webpackFinal: async (config, { configType }) => {
// Modify or return the webpack config.
return config;
}
};
React Cosmos is a development tool for creating reusable React components. It allows developers to render components with different props and states, similar to Storybook. However, React Cosmos focuses specifically on React and does not support other frameworks.
Docz leverages MDX to help you document your things with a focus on writing and design. It's similar to Storybook in that it provides a UI for showcasing components, but it uses MDX as the primary format for stories and documentation.
FAQs
Storybook framework-agnostic API
The npm package @storybook/core-server receives a total of 3,333,012 weekly downloads. As such, @storybook/core-server popularity was classified as popular.
We found that @storybook/core-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.