How to use the @kadira/storybook/package.json.bin function in @kadira/storybook

To help you get started, we’ve selected a few @kadira/storybook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / @sanity / storybook / bin / sanity-storybook.js View on Github external
#!/usr/bin/env node
/* eslint-disable */
var path = require('path')
var resolveFrom = require('resolve-from')
var storybookPath = path.dirname(require.resolve('@kadira/storybook/package.json'))
var storybookPkg = require('@kadira/storybook/package.json')
var binLocation = storybookPkg.bin['start-storybook']

require(resolveFrom(storybookPath, binLocation))