Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/core-server

Package Overview
Dependencies
Maintainers
5
Versions
1215
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

  • 6.3.0-alpha.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7M
increased by1.42%
Maintainers
5
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 14 Apr 2021

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc