https://pulumi.com logo
b

billowy-laptop-45963

09/19/2019, 5:09 PM
how do you guys work with component repos like pulumi-awsx / pulumi-cloud during development. Currently I'm looking to develop a similar library of reusable components. If I were writing python I would just pip install --editable in order to work in two different projects at the same time with going through some kind of install phase. I'd like to develop the components directly in the component repo as I'm building out the new program testing in a development stack.
b

better-rainbow-14549

09/19/2019, 5:28 PM
for node? you can use npm link (allegedly, i've had issues myself) or npm install pointing directly at a file path
b

billowy-laptop-45963

09/19/2019, 6:00 PM
ya I've played with both. I'm not really a node dev so I was looking for some opinions on fully working setups that don't have reinstall loops.
b

broad-dog-22463

09/19/2019, 8:47 PM
I use yarn link @pulumi/aws etc for local development
So I run npm install and then yarn link over the top and it works
b

busy-umbrella-36067

09/19/2019, 11:51 PM
Most of the
Makefiles
in the pulumi projects run
yarn link
for you.
b

billowy-laptop-45963

09/20/2019, 8:11 PM
so the setup on a new machine would be?
Copy code
git clone component_repo
cd component_repo
yarn link
cd ..
git clone project1_repo
cd project1_repo
yarn install
b

busy-umbrella-36067

09/20/2019, 8:12 PM
Copy code
git clone component_repo
cd component_repo
make
cd ..
git clone project1_repo
cd project1_repo
yarn install
b

billowy-laptop-45963

09/23/2019, 4:28 PM
so make in component_repo does a
yarn link @component
and the component_repo dependency in project1_repo specified is specified as
{ "peerDependencies": { "@compnent": "latest" }}
which makes the whole thing just work?
b

busy-umbrella-36067

09/23/2019, 8:02 PM
the project repo shouldn't need anything else besides a
yarn install
, the package manager symlinks the linked package in globally anywhere its used in your system