Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@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.
This package contains common node-side functionality used among the different frameworks (React, RN, Vue, Ember, Angular, etc).
It contains:
start-storybook
dev serverbuild-storybook
static builderThe "preview" (aka iframe) side is implemented in pluggable builders:
@storybook/builder-webpack5
These builders abstract both the webpack dependencies as well as the various core configurations and loader/plugin dependencies provided out of the box with Storybook.
7.0.0-alpha.37 (October 13, 2022)
managerBuilder
before previewBuilder
#19406npx
usage from storybook scripts #19366svelte-vite/default-ts
template #19369FAQs
Storybook framework-agnostic API
The npm package @storybook/core-server receives a total of 2,095,387 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.