Sharing code between projects - Correct method?


#1

Hi,

How can I share pieces of stable code (that will also change over time as we better them) between projects ? I am developing three projects and the copy and paste method seems a bit unproductive when we do a change.


#2

Turn it into a library?


#3

You can create a library (as mentioned by @moors7) or you can have a local library repository and use filesystem links.


#4

Tx


#5

docs over here - let us know how it goes :+1:

https://docs.particle.io/tutorials/developer-tools/cli/#contributing-libraries


#6

Also, you might consider creating a github repository for each library you make, especially if you want to collaborate with any other people. This can also be either private or public. In this case you would usually “clone” the repository folder into the “lib” folder in your Particle project folder structure.