Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Meteor Cookbook
  • Toc
  • feedback
Meteor Cookbook

Meteor Cookbook

By : Isaac Strack
4.4 (5)
close
Meteor Cookbook

Meteor Cookbook

4.4 (5)
By: Isaac Strack

Overview of this book

This book is meant for developers of all experience levels looking to create mobile and full-stack web applications in JavaScript. Many of the simple recipes can easily be followed by less-experienced developers, while some of the advanced recipes will require extensive knowledge of existing web, mobile, and server technologies. Any application or enterprise web developer looking to create full-stack JavaScript-based apps will benefit from the recipes and concepts covered in this book.
Table of Contents (14 chapters)
close
13
Index

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 be using a default project installation, with the client, server, and both folders, to keep the code clean and readable. We will also use the private folder for some static content, so let's add that while we're at it. In a terminal window, navigate...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete