Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
NW.js Essentials

You're reading from   NW.js Essentials Build native desktop applications for Windows, Mac OS, or Linux using the latest web technologies

Arrow left icon
Product type Paperback
Published in May 2015
Publisher
ISBN-13 9781785280863
Length 192 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
 Benoit Benoit
Author Profile Icon Benoit
Benoit
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

NW.js Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1. Meet NW.js FREE CHAPTER 2. NW.js Native UI APIs 3. Leveraging the Power of Node.js 4. Data Persistence Solutions and Other Browser Web APIs 5. Let's Put It All Together 6. Packaging Your Application for Distribution 7. Automated Packaging Tools 8. Let's Debug Your Application 9. Taking Your Application to the Next Level Index

Working with Node.js modules


One of the strengths of Node.js is surely the availability of tens of thousands of modules that are freely downloadable with npm. As you probably know already, Node.js supports three kinds of modules:

  • Internal modules, which are parts of Node API

  • Third-party modules written in JavaScript

  • Third-party modules with C/C++ add-ons

You can use all of them in NW.js with some precautions.

Internal modules

Internal modules such as fs, path, or http are available out of the box and you can call them very easily with the following code:

var fs = require('fs');

Third-party modules written in JavaScript

Third-party JavaScript modules can be installed with npm and will be downloaded with all their dependencies inside the node_modules folder of the application's root folder in order to be shipped with the application. You can require them very easily using the following code:

var modulename = require('modulename');

Third-party modules with C/C++ add-ons

Even though most Node.js modules...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images