npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@storybook/native

v3.1.2

Published

storybook native build tool

Downloads

872

Readme

@storybook/native

This module is a build tool that allows creation of stories to view components inside of Android and iOS native applications easily inside of storybook. The intended purpose is for native developers to be able to quickly get started with storybook without having to learn how to write extensive amounts of JavaScript, and without having to learn how to use storybook.

Installation

npm install @storybook/native or yarn add @storybook/native

Usage

To use this module, you must create a node script such as this example one that imports generateStories from this module. Pass in details about stories that you want this module to generate. Each call to generateStories generates a file that contains stories generated from the information you pass in. Run yarn start-storybook to view those stories in a local storybook instance, or run yarn build-storybook to build a static storybook that can be uploaded as a web page.

Parameters for generateStories

  • category: The group/category that the specified stories will fall under
  • filePath: The path to write the file that contains the generated stories
  • apiKey: Your application's public key that you received from appetize.io
  • platform: What platform your app is running on ("ios" or "android")
  • stories: A list of stories to generate, where each story is an object represented with the following keys:
    • name: The name of the story
    • appParams: Either an object that gets passed to your application when it first launches, or an object representing query string parameters for deep linking. This is what is used to determine which component or page to load in your application, and it can also be used to handle other logic such as theming.
    • docs (optional): Documentation that you want to show up in the storybook docs panel
  • controls: A list of key-value pairs. The key represents the control option, and the value is a data type describing the control configuration, used to generate the story. Currently, supported types include:
    • an array of strings for a select option (default to the first value in the array)
    • a simple string for an editable text field (default to Default if left empty)
    • a boolean for a switch (default to the set value)
    • or an object with 3 keys: min/max/increment for a number (no default value)
  • deepLinkUrl: An optional base URL that is required only if you are using deep linking. Your application must be set to handle incoming URLs for this host (example: sb-native://deep.link)