From 93bcb5d4c39cfe6475ffb2fefc4a2d0f5e4a4c97 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sun, 19 Jul 2020 12:04:50 -0700 Subject: [PATCH] docs: update readme, lodash resolution --- docs/README.md | 49 +++++++++++++++++++++++++++++++++++++++++- docs/package.json | 3 +++ docs/src/template.html | 4 ---- docs/yarn.lock | 8 +++---- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/docs/README.md b/docs/README.md index 51f6a9bb..a888f86c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,6 +2,51 @@ This application was scaffolded using the default webpack [Sapper](https://github.com/sveltejs/sapper) template. +**Purpose** + +- Write integration/end-to-end tests using Cypress +- Serve as an alternative component development environment to Storybook +- Build components in a Server-side Rendering (SSR) environment + +## Getting Started + +`carbon-components-svelte` must be linked in order to reflect live updates during component development. + +In the root folder of this project, run the following: + +```sh +# carbon-components-svelte/ +yarn link +``` + +Then, in this folder, link the package and install the dependencies: + +```sh +cd docs + +# carbon-components-svelte/docs/ +yarn link "carbon-components-svelte" +yarn install +``` + +## Available Scripts + +### `yarn dev` + +Runs the Sapper app in development mode. + +### `yarn build` + +Builds the app for production (static export only). + +### `yarn test` + +Runs Cypress integration tests in a headless browser (i.e. CLI only). + +### `yarn:test:tdd` + +Runs Cypress tests in the Cypress GUI. This is helpful when authoring new tests. + ## Deploying to IBM Cloud Deploy to IBM Cloud using the Staticfile buildpack. @@ -13,12 +58,14 @@ Log in using the IBM Cloud CLI: ```sh ibmcloud login -# if using Single-Sign On (SSO): +# or if using Single-Sign On (SSO): ibmcloud login --sso ``` ### Deploy +Build and deploy the app: + ```sh yarn build ibmcloud target --cf diff --git a/docs/package.json b/docs/package.json index e761276e..7e911591 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,5 +21,8 @@ "svelte": "^3.24.0", "svelte-loader": "^2.9.0", "webpack": "^4.7.0" + }, + "resolutions": { + "**/lodash": ">=4.17.19 " } } diff --git a/docs/src/template.html b/docs/src/template.html index 4e36656f..ec69333a 100644 --- a/docs/src/template.html +++ b/docs/src/template.html @@ -4,10 +4,6 @@ - %sapper.base% diff --git a/docs/yarn.lock b/docs/yarn.lock index 00929322..ded42162 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2150,10 +2150,10 @@ lodash.once@^4.1.1: resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@4.17.15: - version "4.17.15" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +lodash@4.17.15, "lodash@>=4.17.19 ": + version "4.17.19" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== log-symbols@3.0.0: version "3.0.0"