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

@rabbit-company/rabbit-builder

v1.0.5

Published

Automates basic development tasks using customizable configuration files

Downloads

15

Readme

Rabbit Builder

Rabbit Builder is a tool designed to automate some basic tasks that developers commonly perform when building projects. With Rabbit Builder, you can easily copy files, remove files, replace text in files, and minify HTML, CSS, and JavaScript without requiring any programming experience. Instead, Rabbit Builder relies on configuration files that you can customize to meet your specific project needs.

Getting Started

To get started with Rabbit Builder, you'll need to have Node.js and NPM (Node Package Manager) installed on your system. Once you have these installed, you can install Rabbit Builder by running the following command:

npm install -g @rabbit-company/rabbit-builder

This will install Rabbit Builder globally on your system.

Configuration

To use Rabbit Builder, you'll need to create a configuration file in your project directory called rabbit-builder.json. This file should include the path to your source code, the path to your tasks, and any custom variables you want to use in your tasks.

Example for rabbit-builder.json:

{
  "code": {
    "location": "src"
  },
  "tasks": {
    "location": "apps"
  },
  "variables": {
    "{version}": "8.1.1",
    "{copyrightYear}": "2023"
  }
}

Your tasks should be stored in folders located at the path specified in your rabbit-builder.json file. Each task folder should contain a configuration file called rabbit-task.json, which defines the specific actions Rabbit Builder should perform for that task. Each action can have its own configuration options.

Example for rabbit-task.json:

{
  "copy": {
    "action": "copy",
    "location": "../../src"
  },
  "sleep": {
    "action": "sleep",
    "time": 2
  },
  "remove": {
    "action": "remove",
    "files": ["register.html", "lang"]
  },
  "replace": {
    "action": "replace",
    "replace": [
      {
        "from": "::version::",
        "to": "{version}",
        "match": "**/*.{html,ts,js}"
      },
      {
        "from": "::copyrightYear::",
        "to": "{copyrightYear}",
        "match": "**/*.{html,ts,js}"
      }
    ]
  },
  "minifyHTML": {
    "action": "minifyHTML"
  },
  "minifyCSS": {
    "action": "minifyCSS"
  },
  "minifyJS": {
    "action": "minifyJS",
    "sourceMap": "linked"
  }
}

Usage

Once you have your configuration files set up, you can use Rabbit Builder to perform your tasks by running the following command in your project directory:

rabbit-builder
# or
rabbit-builder <task-name>
# or
rabbit-builder <task-name> <task-name> <task-name>...

Replace <task-name> with the name of the task you want to perform. Rabbit Builder will then read the configuration file for that task and execute the specified actions.

Available Actions

Rabbit Builder currently supports the following actions:

  • copy: Copy files from one directory to another
  • sleep: Pause execution for a specified amount of time
  • remove: Remove files from a directory
  • replace: Replace text in a file
  • minifyHTML: Minify HTML files
  • minifyCSS: Minify CSS files
  • minifyJS: Minify JavaScript files

Each action can be configured with its own set of options to customize its behavior.