From e884b5f923a59ff39854dcc76b7db7dc6e57e074 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Fri, 15 May 2020 13:53:31 -0500 Subject: [PATCH] Remove Ember server from Storybook startup (#7980) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The presence of Storybook’s preview-head.html file in the repository is a constant annoyance: it’s only needed for Storybook and it changes all the time, producing a lot of Git noise. By making it a separate step to have the Ember CLI server running before starting Storybook, we no longer need to have preview-head in the repository. It needed to be present because there was a race condition where it was sometimes not generated in time for the Storybook parallel startup. --- .gitignore | 1 + ui/.storybook/preview-head.html | 7 ------- ui/README.md | 2 +- ui/package.json | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 ui/.storybook/preview-head.html diff --git a/.gitignore b/.gitignore index 3713b3b55..37c9d242f 100644 --- a/.gitignore +++ b/.gitignore @@ -81,6 +81,7 @@ rkt-* # misc /ui/.sass-cache +/ui/.storybook/preview-head.html /ui/connect.lock /ui/coverage/* /ui/libpeerconnection.log diff --git a/ui/.storybook/preview-head.html b/ui/.storybook/preview-head.html deleted file mode 100644 index 38a9097a5..000000000 --- a/ui/.storybook/preview-head.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/ui/README.md b/ui/README.md index 196476728..f1be90040 100644 --- a/ui/README.md +++ b/ui/README.md @@ -81,7 +81,7 @@ Nomad UI releases are in lockstep with Nomad releases and are integrated into th ### Storybook UI Library -The Storybook project provides a browser to see what components and patterns are present in the application and how to use them. You can run it locally with `yarn storybook`. The latest version from the `master` branch is at [`nomad-storybook.netlify.com`](https://nomad-storybook.netlify.com/). +The Storybook project provides a browser to see what components and patterns are present in the application and how to use them. You can run it locally with `yarn storybook` after you have `ember serve` running. The latest version from the `master` branch is at [`nomad-storybook.netlify.com`](https://nomad-storybook.netlify.com/). To generate a new story for a component, run `ember generate story component-name`. You can use the existing stories as a guide. diff --git a/ui/package.json b/ui/package.json index 49cf9a3f6..ec46057f8 100644 --- a/ui/package.json +++ b/ui/package.json @@ -14,7 +14,7 @@ "lint:js": "eslint .", "start": "./node_modules/ember-cli/bin/ember server", "build-storybook": "STORYBOOK=true ember build && build-storybook -s dist", - "storybook": "STORYBOOK=true ember serve & start-storybook -p 6006 -s dist", + "storybook": "STORYBOOK=true start-storybook -p 6006 -s dist", "test": "./node_modules/ember-cli/bin/ember test" }, "husky": {