Skip to content

Support static files #56

@noelklein

Description

@noelklein

I used npm init @open-wc to generate a new project. Here I can't use this prebuilt version to output static files with storybook. According to the storybook cli docs I can use -s public to include folders with static assets like images but this doesn't work with your cli.

Storybook CLI docs: https://storybook.js.org/docs/ember/configure/images-and-assets#serving-static-files-via-storybook

Desired functionality:

"storybook:build": "tsc && build-storybook -s public"

Error logs:

mej440@3c22fb0e0c3d some-inventory % yarn storybook:build
yarn run v1.22.10
$ tsc && build-storybook -s public
(node:17178) UnhandledPromiseRejectionWarning: UNKNOWN_OPTION: Unknown option: -s
    at Object.commandLineArgs [as default] (/Users/mej440/Documents/GitHub/asdf/some-inventory/node_modules/command-line-args/dist/index.js:1347:21)
    at main (/Users/mej440/Documents/GitHub/asdf/some-inventory/node_modules/@web/dev-server-storybook/dist/build/cli.js:11:45)
    at Object.<anonymous> (/Users/mej440/Documents/GitHub/asdf/some-inventory/node_modules/@web/dev-server-storybook/dist/build/cli.js:35:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
(Use `node --trace-warnings ...` to show where the warning was created)
(node:17178) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17178) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 4.86s.
mej440@3c22fb0e0c3d some-inventory % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions