From 48fcd526ce8a9bfc6ac633032d65356a360cab3c Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Tue, 10 May 2022 17:06:44 -0400 Subject: [PATCH] Made `Node Packages` page in docs just reference github readmes Value: [1e-8 to 1e-4] --- packages/components/README.md | 2 ++ packages/squiggle-lang/README.md | 14 +++++++++++++ .../website/docs/Features/Node-Packages.md | 20 ++++--------------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/components/README.md b/packages/components/README.md index 03eb5750..38e019a1 100644 --- a/packages/components/README.md +++ b/packages/components/README.md @@ -5,6 +5,8 @@ This package contains the react components for squiggle. These can be used either as a library or hosted as a [storybook](https://storybook.js.org/). +The `@quri/squiggle-components` package offers several components and utilities for people who want to embed Squiggle components into websites. + # Usage in a `react` project For example, in a fresh `create-react-app` project diff --git a/packages/squiggle-lang/README.md b/packages/squiggle-lang/README.md index f6735454..8e84a333 100644 --- a/packages/squiggle-lang/README.md +++ b/packages/squiggle-lang/README.md @@ -13,6 +13,10 @@ For instance, in a javascript project, you can yarn add @quri/squiggle-lang ``` +The `@quri/squiggle-lang` package exports a single function, `run`, which given +a string of Squiggle code, will execute the code and return any exports and the +environment created from the squiggle code. + ```js import { run } from "@quri/squiggle-lang"; run( @@ -22,6 +26,16 @@ run( **However, for most use cases you'll prefer to use our [library of react components](https://www.npmjs.com/package/@quri/squiggle-components)**, and let your app transitively depend on `@quri/squiggle-lang`. +`run` has two optional arguments. The first optional argument allows you to set +sampling settings for Squiggle when representing distributions. The second optional +argument allows you to pass an environment previously created by another `run` +call. Passing this environment will mean that all previously declared variables +in the previous environment will be made available. + +The return type of `run` is a bit complicated, and comes from auto generated `js` +code that comes from rescript. We highly recommend using typescript when using +this library to help navigate the return type. + # Build for development We assume that you ran `yarn` at the monorepo level. diff --git a/packages/website/docs/Features/Node-Packages.md b/packages/website/docs/Features/Node-Packages.md index d8fdc591..b405627a 100644 --- a/packages/website/docs/Features/Node-Packages.md +++ b/packages/website/docs/Features/Node-Packages.md @@ -12,25 +12,13 @@ Types are available for both packages. ## Squiggle Language -The `@quri/squiggle-lang` package exports a single function, `run`, which given -a string of Squiggle code, will execute the code and return any exports and the -environment created from the squiggle code. - -`run` has two optional arguments. The first optional argument allows you to set -sampling settings for Squiggle when representing distributions. The second optional -argument allows you to pass an environment previously created by another `run` -call. Passing this environment will mean that all previously declared variables -in the previous environment will be made available. - -The return type of `run` is a bit complicated, and comes from auto generated `js` -code that comes from rescript. We highly recommend using typescript when using -this library to help navigate the return type. +[_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/squiggle-lang#use-the-npm-package) ## Squiggle Components -The `@quri/squiggle-components` package offers several components and utilities -for people who want to embed Squiggle components into websites. This documentation -uses `@quri/squiggle-components` frequently. +[_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/components#usage-in-a-react-project) + +This documentation uses `@quri/squiggle-components` frequently. We host [a storybook](https://squiggle-components.netlify.app/) with details and usage of each of the components made available.