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

build-ecidi

v0.0.2

Published

An ant-like build program for node

Downloads

4

Readme

#node-builder

node-builder is an ant-like build engine. It comes with many pre-written tasks that you can use in your targets to do things like concatenating files, minifying css and js files, copying files and the like. A full list of current tasks and the necessary parameters are given below.

##Installing

Install node-builder (just "build" on npmjs.org) with npm with:

npm install build

##Setup

After installing build using npm, there are a few things you need to do before you can use node-builder to build a project:

  1. Create a config file. This file will provide node-builder targets with information they need to complete the build. See the sample file in the sample files directory.
  2. Create the target files. Each target should be in it's own file and should be named .target.js. The target file hold the instructions for the builder to process in the form of tasks. (See examples in teh sample files > targets directory.)
  3. Link to the build.sh file from the root of your project directory (recommended) by doing:

ln -s ./node_modules/build/build.sh ./build.sh

You're now ready to run a build by doing:

./build.sh --target a_target_to_run

Options

The build.sh script takes a couple of options (more may be added later if needed):

  • '--target' : indicates which target to run
  • '--config' : the location of the config file. If omitted, the builder assumes it's at ./builder/config.js relative to the build.sh file itself. Targets should always be located in a targets subdirectory in the same directory as your config file.
  • '--logfile' : the location you want the log file written to. If omitted, assumes ./build.log.

##Tasks

The following tasks are currently available:

  • callTarget: calls a different target and is able to pass it parameters
  • compile: uses jxLoader npm module to concatenate javascript files that conform to the MooTools header conventions. It will attempt to determine the correct order to put them in the file.
  • concat: concatenates files
  • copy: copy a file
  • copyDir: copy an entire directory
  • cssmin: uses cssmin to minimize css files
  • delete: delete a file
  • deleteDir: delete an entire directory
  • echo: prints to the screen and log file (not really necessary with the amount of logging that is currently enabled)
  • exec: executes an external process using node's child_process module
  • mkdir: makes a directory if it doesn't exist
  • rename: renames a file
  • replace: replaces string tokens with string values (i.e. [version] with an actual version number) in text-based files

More to come as they are needed.

##Adding your own tasks

You can add your own tasks by definig them in the config.tasks array in your config file. Simplky supply a file path that can be loaded by node and the builder will attempt to require it and then access the tasks member variable to get at the tasks you supplied. See the built in tasks to see how to write them.

##To Do

Still to do on this:

  • more docs on tasks - specifically the parameters needed for each (you can find the parameters in the target files in teh sample directory for now)
  • additional tasks as needed (please leave a ticket for anything you think should be added)