From ab88075d9c308638054f25b2c0e855a9c4a9a4dc Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Tue, 11 Aug 2020 13:39:47 +1000 Subject: [PATCH] Add deprecated docs to monorepo --- examples/README.md | 50 ++++++++++++++++++++ lib/core/docs/standalone.md | 91 +++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 examples/README.md create mode 100644 lib/core/docs/standalone.md diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000000..3c8dacbef2dd --- /dev/null +++ b/examples/README.md @@ -0,0 +1,50 @@ +## The Storybook official examples + +Live examples of these: + +### Next release + +- [React Official](https://next--storybookjs.netlify.com/official-storybook/) +- [Vue](https://next--storybookjs.netlify.com/vue-kitchen-sink/) +- [Angular](https://next--storybookjs.netlify.com/angular-cli/) +- [Mithril](https://next--storybookjs.netlify.com/mithril-kitchen-sink/) +- [Marko](https://next--storybookjs.netlify.com/marko-cli/) +- [HTML](https://next--storybookjs.netlify.com/html-kitchen-sink/) +- [Svelte](https://next--storybookjs.netlify.com/svelte-kitchen-sink/) +- [Riot](https://next--storybookjs.netlify.com/riot-kitchen-sink/) +- [Ember](https://next--storybookjs.netlify.com/ember-cli/) +- [Preact](https://next--storybookjs.netlify.com/preact-kitchen-sink/) +- [Rax](https://next--storybookjs.netlify.com/rax-kitchen-sink/) + +### Current release + +- [React Official](https://storybookjs.netlify.com/official-storybook/) +- [Vue](https://storybookjs.netlify.com/vue-kitchen-sink/) +- [Angular](https://storybookjs.netlify.com/angular-cli/) +- [Mithril](https://storybookjs.netlify.com/mithril-kitchen-sink/) +- [Marko](https://storybookjs.netlify.com/marko-cli/) +- [HTML](https://storybookjs.netlify.com/html-kitchen-sink/) +- [Svelte](https://storybookjs.netlify.com/svelte-kitchen-sink/) +- [Riot](https://storybookjs.netlify.com/riot-kitchen-sink/) +- [Ember](https://storybookjs.netlify.com/ember-cli/) +- [Preact](https://storybookjs.netlify.com/preact-kitchen-sink/) +- [Rax](https://storybookjs.netlify.com/rax-kitchen-sink/) + +### 5.0 + +- [React Official](https://release-5-0--storybooks-official.netlify.com/) +- [Vue](https://release-5-0--storybooks-vue.netlify.com/) +- [Angular](https://release-5-0--storybooks-angular.netlify.com/) +- [Mithril](https://release-5-0--storybooks-mithril.netlify.com/) +- [Marko](https://release-5-0--storybooks-marko.netlify.com/) +- [HTML](https://release-5-0--storybooks-html.netlify.com/) +- [Svelte](https://release-5-0--storybooks-svelte.netlify.com/) +- [Riot](https://release-5-0--storybooks-riot.netlify.com/) +- [Ember](https://release-5-0--storybooks-ember.netlify.com/) +- [Preact](https://release-5-0--storybooks-preact.netlify.com/) + +### 3.4 + +- [React Official](https://release-3-4--storybooks-official.netlify.com) +- [Vue](https://release-3-4--storybooks-vue.netlify.com/) +- [Angular](https://release-3-4--storybooks-angular.netlify.com/) diff --git a/lib/core/docs/standalone.md b/lib/core/docs/standalone.md new file mode 100644 index 000000000000..8bbe0fc629dd --- /dev/null +++ b/lib/core/docs/standalone.md @@ -0,0 +1,91 @@ +## Standalone Mode + +Storybook can be run standalone from Node, although it should be noted this isn't officially supported any more. + +```js +const storybook = require('@storybook/{APP}/standalone'); + +storybook({ + // options +}); +``` + +Where the APP is one of the supported apps. For example: + +```js +const storybook = require('@storybook/react/standalone'); + +storybook({ + // options +}); +``` + +## Mode + +Mode is defining what Storybook mode will be applied: + +### dev + +run Storybook in a dev mode - similar to `start-storybook` in CLI + +```js +const storybook = require('@storybook/react/standalone'); + +storybook({ + mode: 'dev', + // other options +}); +``` + +### static + +build static version of Storybook - similar to `build-storybook` in CLI + +```js +const storybook = require('@storybook/react/standalone'); + +storybook({ + mode: 'static', + // other options +}); +``` + +Other options are similar to those in the CLI. + +## For "dev" mode: + +```plaintext +port [number] Port to run Storybook +host [string] Host to run Storybook +staticDir Directory where to load static files from, array of strings +configDir [dir-name] Directory where to load Storybook configurations from +https Serve Storybook over HTTPS. Note: You must provide your own certificate information. +sslCa Provide an SSL certificate authority. (Optional with "https", required if using a self-signed certificate) +sslCert Provide an SSL certificate. (Required with "https") +sslKey Provide an SSL key. (Required with "https") +smokeTest Exit after successful start +ci CI mode (skip interactive prompts, don't open browser) +quiet Suppress verbose build output +``` + +## For "static" mode: + +```plaintext +staticDir Directory where to load static files from, array of strings +outputDir [dir-name] Directory where to store built files +configDir [dir-name] Directory where to load Storybook configurations from +watch Enable watch mode +quiet Suppress verbose build output +``` + +Example: + +```js +const storybook = require('@storybook/angular/standalone'); + +storybook({ + mode: 'dev', + port: 9009, + configDir: './.storybook', +}); +```