Get started in the browser¶
The fastest and easiest way to create a Pack is to use our web-based Pack Studio. You don't need to download any code or tools, just make sure you have:
- A Coda account, with
- Doc Maker access in your workspace.
If you're new to Coda, sign up for a free account and you'll automatically be made a Doc Maker in your personal workspace.
Navigate to the Pack Studio¶
The Pack Studio is built right in to the Coda application. To get there:
- Open Coda in your browser.
- Click on Packs in the navigation menu on the left. If you are a member of multiple workspaces you will need to select a workspace first.
- Click the New Pack button in the upper right.
You are now in the Pack Studio, ready to start building!
Create a Pack from sample code¶
All new Packs created in the Pack Studio start off with the basic Hello World sample code. Take a moment to read through the code and comments and get an understanding of how a Pack is structured.
Next we'll use the Pack Studio to build that code and get it ready to use:
-
Click on the Pack name Untitled Pack in the upper left, and change it to "Hello World".
-
Click the Build button in the bottom left.
This checks your Pack for errors and Packages it up for use in a Coda doc. It can take a few seconds for the build to complete.
-
When the confirmation screen appears, click Create a blank test doc.
Your Pack is now built and ready to use!
Install and use the Pack¶
Your new Pack is now available to use in all your docs, and you can install it just any other Pack.
- In your doc, click Explore, then Packs & import.
-
Find your new Pack, Hello World, and click on it.
This will open a dialog with more information about the Pack.
-
Click the Install button in the upper right.
-
Drag the Hello formula from the panel on the right into your doc.
Alternative: Type the formula
Place your cursor in the doc and type
=Hello
, and then press the tab key to select formula from your Pack. -
Complete the formula by passing in a name parameter, such as
Hello("World")
, and hit enter.
If everything has gone right you should see the result Hello World
as the output of your formula.
Tip
For a more personalized message, try changing the formula to Hello(User())
.
Update the Pack¶
Now that you have your Pack up and running let's make a change to how it works.
-
Back in the Pack Studio, update your code to say "Howdy" instead of "Hello":
execute: function ([name]) { return "Howdy " + name + "!"; },
-
Click the Build button again to rebuild your Pack with this change.
-
When the Build has completed, switch back to your test document.
You'll notice that the formula is still returning
Hello World
, and that's because formulas aren't automatically recalculated when you update your Pack code. -
In the Pack's panel, click the Settings tab.
The INSTALLED version of the Pack should now read v2.
Re-opening the Pack's panel
If you have navigated away from the Pack's panel, click Explore, Packs & import, and then your Pack name.
-
Click the Open Pack maker tools button.
-
In the Pack maker tools bar, click the three dots icon and then Refresh Pack formulas and tables.
A Syncing... indicator will appear at the top of the screen while the formulas are being refreshed.
Your formula result should now be Howdy World
.
Tip
To avoid having to manually refresh the formulas on every update, click the gear icon in the Pack maker toolbar and toggle on the AUTO-REFRESH setting.