New NPM Module: Favorites
2 minute read
I don’t know about you, but there are a few modules that I tend to use really often in the projects I’m working on. I usually go with some combination of eslint, lodash, babel, and a number of others. I’ve written briefly about some of my favorites here and here.
I also find myself trying to stay current with the latest version of node for security considerations as well as all the other good that comes from using the current stable version. Since the Node.js foundation was formed and node/io.js merged, stable versions have been coming way more often than before.
And each time I use nvm or n to switch to the latest version, I end up reinstalling quite a few global packages I use for different things or I want available if I have to be offline.
For example:
npm i -g pm2 express lodash async bluebird babel nodemon mongoose pageres gulp react reactDOM aws mocha webpack browserify request superagent...
I got tired of doing this over and over, since the running list I keep in my head changes from time to time and varies based on my caffeination and time of day. So, I created a simple module that’ll install your favorites: favorites.
It’s nothing crazy, just a simple node.js cli tool that’ll take a favorites.json
file from a local or remote path, validate it (there’s a really simple schema you follow), and will install either your global favorites or your project favorites. Easy.
Example usage:
Commands:
install <favorites> install your favorites
Options:
-h, --help output usage information
-V, --version output the version number
-v, --verbose Show parsed favorites to be installed
-p, --project Install your favorites into a local project
-g, --global Install your favorites globally
Get started!
npm i -g favorites
cd /myCoolNewProject
favorites install -g https://raw.githubusercontent.com/markthethomas/npmFavorites/master/favorites.json
I’m thinking of trying to add something like extendable templates in the future, so you could provide a custom type of favorites list, like a react-focused on or something for APIs. Ideas? Let me know in the comments! If you want to help out, consider opening a PR on github!
Related:
- A Guide to the React Ecosystem
- 50% off React in Action Today
- A Conceptual Introduction to React Components
- I'm writing a book about React!
- Type Inspection In Go
- Testing React Components with Enzyme and Mocha
- Start Simply, Simply Start
- Using Event Emitter in Node.js
- React Native: Quick Start and Including Images
- Method Chaining in JavaScript
- Npm Modules I can't live without (pt. 2)
- Running Node.js Apps in Production
- Server-Side Rendering with React and React-Router
- Installing iojs and Node.js Together
- Get Functional