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 🙏

© 2025 – Pkg Stats / Ryan Hefner

makescript

v0.1.4

Published

A javascript-based make tool

Readme

Makescript v0.1.3

INSTALLING

  • git clone git://github.com/nbdd0121/make.js.git
  • cd make.js
  • npm install

OR SIMPLY

  • npm install -g makescript

USAGE

  1. Create your own makescript file
  2. Execute makejs
  3. Should work as expected

MAKESCRIPT

This tool organizes libraries by modules. Currently there are 4 modules:

basic |--- ----------------|------- log(TEXT) |Display TEXT chdir(PATH) |Change working directory to PATH cwd() |Return current working directory exit(CODE) |Exit process with error code CODE await(PROMISE) |Wait until PROMISE finishes sleep$(TIME) |Create a promise which will resolve after TIME millseconds sleep(TIME) |Sleep for TIME millseconds exec$(CMD, ARG) |Create a promise which will resolve or reject according to the result of executing CMD with argument ARG exec(CMD, ARG) |Execute CMD with argument ARG make$(ARG) |Create a promise which will resolve or reject according to the result of executing makescript with argument ARG make(ARG) |Execute makescript with argument ARG

file |--- --------------------|------- exists(PATH) |Determine whether PATH exists parentDir(PATH) |Get parent directory of PATH isDir(PATH) |Determine whether PATH is a directory ls(PATH) |List all files under PATH recursiveList(PATH) |List all files and files in subdirectory under PATH rm(PATH, OPT) |Remove files specified by PATH, using option specified in OPT (nothing, 'r', 'f' or ['r', 'f']) rmdir(PATH) |Remove directory PATH mkdir(PATH, OPT) |Make directory PATH using option OPT (nothing or 'p')

make

target(TARGET, DEP, ACTIONS)

Create a rule that will make TARGET using dependency DEP. TARGET will only be made if one of DEP needs making or one of DEP is newer than TARGET. If made, ACTIONS will performed.

TARGET can be string, regexp, or function

string means exact match regexp will match target if regexp.exec(target) returns trusy value function will match target if function(target) returns trusy value

DEP can be string or function

string means a specified dependency function will create a dependency list according to return value of function(target)

ACTIONS are a list of function

function(target, dependency) will be executed when target is judged is make-needed

phony(TARGET, DEP, ACTIONS)

Create a rule, while TARGET is not considered a file, but only a name of rule. Phony targets will always be made.

makeTarget(TARGET)

Explicitly make TARGET.

asDefault(TARGET)

Set TARGET as the default target. TARGET will be made when no target is specified to make in the command line arguments

file-helper

makeParentDirIfNotExist(PATHS)

Create all PATHS' parent directory if they did not exist

Of the 4 modules, basic, make and file are loaded by default. When modules are loaded, its functions are added to the global object, so you can use them directly. Loaded modules can be accessed by loadedModules.

To load a module explicitly, use use('module_name'). For example, if you want to use module file-helper, write code use('file-helper').

EXAMPLE MAKESCRIPT

use('file-helper');
log(loadedModules); // Output will be ['basic', 'make', 'file', 'file-helper']
function linker(target, dep) {
	exec('gcc', '-o', target, dep);
}
function cc(target, dep) {
	exec('gcc', '-c', '-o', target, dep);
}
var OBJECTS = recursiveList('src').filter(function(name) {
	return /\.c$/.exec(name);
}).map(function(name) {
	return 'bin/' + name.replace(/\.(c|asm)$/, '.o');
});	// Powerful customed making using regular expression and JavaScript built-in functions
makeParentDirIfNotExist(OBJECTS);
target(/bin\/.*\.o$/, function(target) {
	return target.replace('bin/', 'src/').replace(/\.o$/, '.c');
}, cc);	// Regexp as target and function as dependency generator
target('output', OBJECTS, linker); // Basic kind of target
asDefault('output');

COMMAND LINE OPTIONS

Short|Long |Description -----|---------------------|----------- -B |--always-make |Unconditionally make all targets -C |--directory=DIRECTORY|Use DIRECTORY as work directory -d |--debug |Print debug information and will not reduce stack trace on error -f |--file=FILE |Read FILE as a makescript -h |--help |Print this message and exit -j |--jobs=N |Allow N jobs at once; infinte jobs with argument 0 -s |--silent |Don't echo recipes -S |--no-stdout |Do not show messages written to stdout -v |--verbose |Print verbose messages for debugging