po-util's new features is its library manager.
The library manager makes it easy to use Particle libraries when developing with
po-util locally. The library manager does this by using
git to download Particle libraries hosted on GitHub and save them to a
~/.po-util/lib directory so that they make be linked inside of projects later.
Here are all of the commands for the library manager:
"po library": The Particle Library manager for po-util. Libraries are kept in ~/.po-util/lib Commands: get Download a Particle Library from GitHub and optionally name it. install Example: po lib get https://github.com/user/libraryName libraryName add Add a downloaded library to a po-util project. import Libraries are added in the firmware directory as soft links. Example: po lib add libraryName remove Remove a library from a po-util project. rm Just the soft links are deleted. Example: po lib rm libraryName create Create a library from C++ files in the project directory. Example: po lib create someLibrary purge Uninstall (delete) a library from ~/.po-util/lib Example: po lib purge someLibrary list Show all libraries in ~/.po-util/lib help Show this help documentation.
Can I transfer my Web IDE Project?
The library manager makes it easy to download libraries used in the Web IDE. Here is an example showing how to download the official
Step 1: Finding the GitHub URL
To find the GitHub URL for a library on the Web IDE, simply click on the GitHub Icon.
You will be taken to the library’s GitHub repository. Click on the “Clone or Download” button and copy the URL inside of the box.
Step 2: Downloading the library
Assuming you already have
po-util installed, you would simply download a library by doing:
po lib get GITHUB_URL
pasting in the URL you copied from GitHub.
So to get the
PowerShield library you would do:
po lib get https://github.com/spark/PowerShield.git
Step 3: Adding the library to a
To add a library to a project you would run:
po lib add LIBRARY_NAME
So to add the
PowerShield library you would run:
po lib add PowerShield
####Step 4: Using the library
To include the library, you would simply add:
Does this make local development easier?
It does. The library manager adds a useful feature to
po-util an even more handy tool for developing locally. The library manager is included in
po-util, which is available for Linux and MacOS for everyone to use for free.
Po-util can be downloaded by doing:
curl -fsSLO https://raw.githubusercontent.com/nrobinson2000/po-util/master/po-util.sh ./po-util.sh install