You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@storybook/core-server

Package Overview
Dependencies
Maintainers
11
Versions
1078
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/core-server

Storybook framework-agnostic API


Version published
Weekly downloads
4.6M
decreased by-2.36%
Maintainers
11
Created
Weekly downloads
 

Package description

What is @storybook/core-server?

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.

What are @storybook/core-server's main functionalities?

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;
  }
};

Other packages similar to @storybook/core-server

Changelog

Source

8.2.1

  • CPC: Fix type generation - #28507, thanks @ndelangen!
  • Types: Update type signatures of objects and functions - #28503, thanks @valentinpalkovic!

Keywords

FAQs

Package last updated on 10 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc