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-friend

v0.1.8

Published

A task runner and a build system

Downloads

13

Readme

build-friend

A task runner and a build system

NPM Version Build Status

##Documentation:

###installing build-friend cli creates a command buildfriend you can use this command to run tasks,install build-friend globally

using the following command


$ npm install -g build-friend

build-friend cli requires build-friend module to be installed locally,install build-friend locally using below command


$ npm install build-friend

###Sample build-friend.js

This file is just a quick sample to give you a taste of what build-friend does.


var buildfriend = require('build-friend');

var gulp = require('gulp');

buildfriend.task('run',['t1','t2'],function() {
	return console.log('run task is done');
});

buildfriend.task('t1',function() {
	return console.log('t1 task is done');
});


buildfriend.task('t2',function() {
	return console.log('t2 task is done');
});

buildfriend.task('copy',function(){
	return gulp.src('./**/*.*').pipe(gulp.dest('./copy'));
});

buildfriend.task('copy2',['copy'],function(){
	return gulp.src('./copy/**/**/*.*').pipe(gulp.dest('./copy2'));
});

###Task dependencies execution

if task1 depends on task2 u should create task like this


/* 
 * you should return some value otherwise build-friend doesn't know when the task is completed
 * ,because of that depedencies may run in parallel with actual task,so to avoid that you should 
 *  return a value
 *
 */

buildfriend.task('task1',['task2'],function(){

	return (task code)

});

####Watching for changes and runnig tasks

build-friend watch depends on gaze

check there for the glob patterns supported by gaze


/*you should pass exactly three parameters the first one is glob pattern and the second parameter
*should be an array of tasks to run on change and the thrid parameter should be a function it will
*be invoked each time there is an event like file delete,change,creat...*
*/

buildfriend.watch('./**/*.js',['task1','task2'],function(event,filepath){
	console.log(event+' '+filepath);
});


/* On every event (like file creation or deletion or updation) tasks are 
*  run in a sequencial manner like task2 will run after task1's completion
*/

Running tasks


   $ buildfriend taskname;
    

####Example:-


   $ buildfriend t1;

plugin's and other features

Right now build-friend doesn't have plugins specific to it but you can you gulp plugins

as shown in the sample build-friend.js file and there are seperate node modules for

providing minifying,compressing,jshint,copying,deleting features you can use them along with

build-friend.

Note

you should require build-friend

require('build-friend')

to use build-friend, create your tasks in build-friend.js file

you should run your task using


   $ buildfriend taskname 
	

not the following

	
   $ build-friend taskname 

###Features Planned

plugins support

###LICENSE MIT