O'Reilly logo

Meteor Cookbook by Isaac Strack

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using npm packages directly

We have seen from the Using npm modules recipe in Chapter 2, Customizing with Packages, how to wrap npm packages inside your own personal package, using the Npm.depends() directive. That's all well and good, but what if we want to just use npm directly, without creating a custom package? Arunoda Susiripala — one of the most prolific (and brilliant) Meteor community developers, has written a package that helps us do just that. In this recipe, you will learn how to use the meteorhacks:npm package to implement a npm module directly in your code. Specifically, we will use the Highlight.js module on the server to properly format JavaScript code, as you might see in markdown or in an online code editor.

Getting ready

We will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required