npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

neotools-cli

v1.1.6

Published

nodejs bootstrapper

Downloads

16

Readme

NeøTools CLI

NeøTools CLI is a NodeJS project bootstrapper designed to help you with your projects. It's a CLI tool that allows you to create a NodeJS base structure with a predefined logic and some useful tools.

Installation

You can install neotools-cli with npm as follows:

  npm install -g neotools-cli

Usage/Examples

You can start a new project with the command:

  neotools start

and it will start creating the structure and adding tools to your new project, additionally, you will be prompted with a question at the end of the execution asking if you want to add the necesary dependences to the package.json file, if you choose yes you need to execute an npm install after finished.

You can also generate models, controllers and routes with the command:

  neotools --generate || neotools --g 

For example, if you want to generate a model, you can use the command:

 neotools --generate model || neotools -g m

You can generate controllers and routes in the same way.

Additionally, you can also generate all the elements of a model, controller and route with the command

 neotools --generate all || neotools -g a

Each index.js file generated inside ./controllers, ./models and ./routes has an controller, model and route auto exporter, so you dont have to export it manually for using it!

The structure of projects created with NeøTools is as follows:

.
├── routes
│   ├── index.js
├── controllers
│   ├── index.js
├── models
│   ├── index.js
├── utils
│   ├── neo-logs.js
│   └── common.functions.js
├── app.js
├── package.json 
└── index.js

As an example, if you generate a controller with the command neotools -g c and you give it the name of user when prompted, the new controller will be added automaticaly to the controllers folder as follows:

.
├── controllers
│   ├── index.js
└── └── + user.controller.js

Note: The same logic applies to new routes and models.

Modules

The 'utils' folder contains the 'neo-logs.js' file, which is a tool to help you with the logs of your project, and the 'common.functions.js' file, which contains common functions that you can use in your project.

You can add the Logs or the Helpers module sepparately, just use the command 'neotools --add' or 'neotools -a' followed by the module name.

Example: 'neotools --add logs' or 'neotools -a logs'
Example: 'neotools --add helpers' or 'neotools -a helpers'
Example: 'neotools --add logs utils' or 'neotools -a logs utils'

The necesary packages and dependences for your project will add automaticaly to your package.json when prompted to you at the end of the execution of the command neotools start, but you can add it separately with the followig command:

    neotools --add dependences || neotools -a dependeces

These dependences are:

  • axios
  • body-parser
  • cors
  • express
  • express-fileupload
  • form-data
  • jwt-simple
  • log4js
  • moment
  • mongoose
  • node-cron
  • nodemailer
  • nodemon
  • crypto

After adding it, you will need to execute an

  npm install

either having used the neotools start command or adding them separately with the neotools --add dependences command.

Logs

NeøTools CLI has his own definition of console.log (overwritting it) for NodeJS, specifing the line of execution of the log itself, helping the debugging process a little bit further, while giving the chance of removing them precisely when a log ended up in production.

  Example:   index.js

  console.log("test");

  console output:
  ---------------
  [index.js:4:9 ⚪️ ] » test

There's also a clasification of different logs type with different output colors:

console.error("test");    →   [index.js:4:9 🔴 ] »   test
console.success("test");  →   [index.js:4:9 🟢 ] »   test
console.info("test");     →   [index.js:4:9 🔵 ] »   test
console.warn("test");     →   [index.js:4:9 🟡 ] »   test

Authors

🔗 Links

linkedin twitter

Appendix

More functionalities are on the way! :)