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

core.bot

v1.0.6

Published

A dynamic node task runner

Downloads

39

Readme

core.bot

A dynamic node task runner.

Installation

Install globaly with npm.

npm install -g core.bot

Usage

Test your installation:

bot

You should drop into a repl which means the installation was successful. ( press CTRL-C twice to exit )

The bot was designed to allow you to execute your own commands, in a specific area of your file system, like a project folder. It does so by copying most of it's source code into a local folder called 'core.bot.local'. the location of a 'core.bot.local' is up to you but the commands in a local will only be accessible from the location of the local and downwards.

To create a local, go to the root of a project ( or a projects directory ) and run:

bot local

This will create a folder called core.bot.local, that looks like this:

|-commands
|-node_modules
|-index.js

Whenever you run bot from within your project now, the bot finds this folder and runs the 'index.js' file.

Commands

If you look into 'index.js' you will see that the first argument that you pass to bot is treated as a path to a command folder. this means that whatever you put into the core.bot.local/commands folder, will be available as a command across your project.

navigate to a folder inside your project and test one of the commands, for example module:

cd ./modules
bot module YOUR_MODULE_NAME

Available commands

These commands are available out of the box:

  • module - create a core module. expects a name as the only argument.
  • component - create a core component. expects a name as the only argument.
  • view - create a core view. expects a name as the only argument.
  • plugin - create a core plugin. expects a name as the only argument.
  • feature - create a core plugin with components, moduels and actions. expects a name as the only argument.
  • action - create a core action. expects a name as the only argument.
  • client - create a core web client. expects a name as the only argument.
  • command - create a core.bot command. expects a name as the only argument.
  • local - create a core.bot.local with the bot's source code.

Once you run bot local you can step into core.bot.local/commands and edit these commands. your changes will apply the next time you run the bot.

If you want to create a new command you only nee to add a folder with your command to core.bot.local/commands, and you can use the bot to do that for you:

cd core.bot.local/commands
bot command COMMAND_NAME

How does it work

When you run a command from the cli (bot [COMMAND] [ARGUMENTS]), the bot is looking for a core.bot.local folder in the working directory. if it does not find one it keeps looking upwards in the file system until one is found. if no core.bot.local folder is found in the current file system tree the bot will use it's internal copy of this folder.

The content of this folder determines what happens next as the bot's only job is to execute it.