Let's learn how to create a small and simple node module with some ES2015 features and more. This is part 1 where we basically set up our project. If you want to skip this part, you can just clone the project locally.

Introduction

If you don't know me, since I left my job I started focusing on open source and creating some products that I've always wanted to create. And now I have 81 node packages on npm.

It's been a great experience to work on open source and I have learned a lot! Here a couple of my projects

react-cookies: Load and save cookies with React

npm-donate: Support maintainers with a donation and help them continue with activities.

pokemon-game: Pokemon game — Get ’em all

git-synced: Keep a fork up to date

sketch-json: Transform sketch files to json and json to sketch files

goot: Goot humanize greetings

credit-card-prompt: Credit card prompt with validation and address lookup

I also have been working on two projects:

Inkblee: Where tattoo artists get inspired and hired

franz: Your benchmarking assistant

Enough chitchat! Let's learn how to create a node module from scratch.

What are we going to create?

We will create a simple node module to create a pizza. Yes, it's lame. But we will be learning about

async/await

destructuring

promises

tests

lint

publishing npm package

semver

continuous integration

And all that good stuff++.

What are we going to use?

nodejs: If I recall correctly nodejs introduced async/await on v7.3.0 , so make sure you use this version or higher. I'm using v8.3.0 .

on , so make sure you use this version or higher. I'm using . npm: I'm using v5.3.0 .

. ava: Futuristic JavaScript test runner.

xo: JavaScript happiness style linter.

prettier: Prettier is an opinionated code formatter.

travis-ci: Test and Deploy with Confidence.

Getting started