Build

AngularJS + Docco: Walkthrough of PubNub’s AngularJS Library

2 min readPubNub Staff on Aug 20, 2014
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

We're documenting our AngularJS SDK for PubNub with Docco. AngularJS Docco makes is simple, clean, and informational for documentation.

angularjs doccoHere at PubNub, we love documentation, but you’ve probably already guessed that from our extensive collection of client SDKs and detailed API documentation. Introducing AngularJS Docco documentation.

Up until now, we’ve been using Markdown mostly for the README-level documentation of the AngularJS library. For this blog entry, we recently discovered the Docco library for creating annotated source code, and instantly fell in love!

You may already be familiar with Docco if you use the Underscore JS library. Docco powers the Underscore  annotated source code  feature. We found it to be tremendously helpful as we learned about Underscore internals, and figured we’d try to apply this awesome tool to the PubNub AngularJS library as well!

Using Docco is just about as simple as you can get:

  1. Install docco via npm install -g docco
  2. Add comments to your JavaScript (or, in our case, CoffeeScript) source code
  3. Run docco source_file.coffee to generate the HTML documentation! (in a ‘docs’ directory by default)
angularjs docco21

Please check out our initial cut of the documentation here at the AngularJS Docco annotated source code, and let us know what you think! We love the idea of helping developers gain more insight into how this powerful library works, as well as provide an easy way for developers to easily submit changes or updates to the documentation.

Do you have any tips, tricks or best practices that you’d suggest for the PubNub JavaScript frameworks or other SDK’s? Please drop us a line and let us know! And check out all the blog posts from our real-time AngularJS with PubNub series here.

More from PubNub

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff