Over the last five years, Node.js has helped to bring uniformity to software development. You can do anything in Node.js, whether it be front-end development, server-side scripting, cross-platform desktop applications, cross-platform mobile applications, Internet of Things, you name it. Writing command line tools has also become easier than ever before because of Node.js — not just any command line tools, but tools that are interactive, useful and less time-consuming to develop.Thank you for reading this post, don't forget to subscribe!
If you are a front-end developer, then you must have heard of or worked on Gulp, Angular CLI, Cordova, Yeoman and others. Have you ever wondered how they work? For example, in the case of Angular CLI, by running a command like ng new <project-name>, you end up creating an Angular project with basic configuration. Tools such as Yeoman ask for runtime inputs that eventually help you to customize a project’s configuration as well. Some generators in Yeoman help you to deploy a project in your production environment. That is exactly what we are going to learn today.
Further Reading on SmashingMag: Link
- A Detailed Introduction To Webpack
- An Introduction To Node.js And MongoDB
- Server-Side Rendering With React, Node And Express
- Useful Node.js Tools, Tutorials And Resources
In this tutorial, we will develop a command line application that accepts a CSV file of customer information, and using the SendGrid API, we will send emails to them. Here are the contents of this tutorial:
- “Hello, World”
- Handling command line arguments
- Runtime user inputs
- Asynchronous network communication
- Decorating the CLI output
- Making it a shell command