From c36bb7565354b8681083b97d920b6286d8dea062 Mon Sep 17 00:00:00 2001 From: joeduffy Date: Sat, 11 Mar 2017 09:01:33 -0800 Subject: [PATCH] Simplify the library README --- lib/README.md | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/lib/README.md b/lib/README.md index 4148ea2d8..2c459e3a8 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,41 +1,27 @@ # coconut/lib -This directory contains the various libraries (Nuts) that Coconut programs may depend upon. +This directory contains some libraries that Coconut programs may depend upon. + +## Overview The Coconut standard library underneath `coconut/` is special in that every program will ultimately use it directly or indirectly to create resources. +Similarly, `cocojs/` is the CocoJS compiler's runtime library, and so most CocoJS programs will on it. + Note that these are written in the Coconut subsets of the languages and therefore cannot perform I/O, etc. +## Installation and Usage + Eventually these packages will be published like any other NPM package. For now, they are consumed only in a -development capacity, and so there are some manual steps required to prepare a development workspace. +development capacity, and so there are some manual steps required to prepare a developer workspace. -For each library `` you wish to use, in dependency order: +For each library `` you wish to use, please see its `install.sh` script in its root directory. This performs +installation so that it can be used simply by adding a dependency to it. -* `cd ` -* `yarn install` -* For each dependency ``: - - `yarn link dep` -* `yarn build` -* `yarn link` - -And then from within each Nut's directory, ``, that will consume said libraries: +We currently use NPM/Yarn symlinks to ease the developer workspace flow. As such, you will need to run: * `yarn link ` -For example, let's say we want to use the standard library and the AWS library from another Nut, `/dev/mypackage`: - -* First, `cd $GOPATH/src/github.com/pulumi/coconut/lib/coconut`: - * `yarn install` - * `yarn build` - * `yarn link` -* Next, `cd $GOPATH/src/github.com/pulumi/coconut/lib`: - * `yarn install` - * `yarn link @coconut/coconut` - * `yarn build` - * `yarn link` -* Finally, `cd /dev/mypackage`: - * `yarn link @coconut/coconut` - * `yarn link @coconut/aws` -* Now we are ready to go working on `mypackage`, and the two Nut references will be resolved correctly. +In a project that intends to consume `` before actually using it. For example, `yarn link @coconut/coconut`.