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

@biotope/preview

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biotope/preview

A package to preview all your biotope components

  • 0.1.1-0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

biotope-preview 🌻

First, install the @biotope/preview package as any other regular npm package:

npm install https://github.com/biotope/biotope-preview.git --save

Next, your component needs a package.json with the following data. This is required for the process to work:

{
    "name": "yourComponentName",
    "tagName": "your-component-html-tag",
    "previewConfigs": [
        {
            "name": "Name for your Component Preview in Storybook",
            "props": {
                "exampletext": {
                    "headline": "Example",
                    "claim": "With a claim",
                    "secondaryColor": false
                },
                "exampleimage": {
                    "url": "https://picsum.photos/id/804/1000/600",
                    "alignment": "center",
                    "alignmentLarge": "center",
                    "altText": "Image"
                }
            }
        }
    ]
}

After creating a package.json with the required data, you have to run:

npm run build

because storybook relies on the compiled components' source files in the dist folder.

It parses your src/components/ subfolders for the component's package.json's and creates previews based on the configuration inside.

Then you can run either

npx biotope-preview-build

or

npx biotope-preview-serve

biotope-preview-build will create a preview folder in your project with a index.html you then can serve somewhere. biotope-preview-serve will not create any folder, but only serve a temporary storybook preview.

FAQs

Package last updated on 05 Mar 2020

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