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 🙏

© 2026 – Pkg Stats / Ryan Hefner

dev361-front-builder

v1.1.2

Published

Front assets build tool

Readme

Dev361 Front-End Assets Builder

Dev361-Front-Builder, or DFB, is a simple Gulp wrapper used to build assets with a few basic tasks and paths configuration.

Installation

Create a minimal package.json at project root :

npm init

Install dev361-front-builder :

$ npm install --save dev361-front-builder

Configuration

Add these scripts to package.json :

{
  "scripts": {
    "dfb" : "node_modules/.bin/dfb help",
    "dfb:build" : "./node_modules/.bin/dfb build",
    "dfb:build:prod" : "./node_modules/.bin/dfb build:prod",
    "dfb:watch" : "./node_modules/.bin/dfb watch",
    "dfb:live" : "./node_modules/.bin/dfb live"
  }
}

Create a dfb.config.js file at project root, put your project's assets path in it like so :

var config = {
    frontBuilder : {
        js: [
            {src: 'path/to/jsSourceFile.js', dest: 'path/to/jsDestinationFile.js'},
            {src: ['path/to/otherJsSourceFile1.js', 'path/to/otherJsSourceFile2.js'], dest: 'path/to/otherJsDestinationFile.js' }
        ],
        css: [
            {src: 'path/to/sassSourceFile.scss', dest: 'path/to/compiledCssFile.css'}
        ],
        copy: [
            {src: 'path/to/directoryToCopy/**/*', dest: 'path/to/destinationDirectory/'}
        ],
        img: [
            {src: 'path/to/imagesDirectoryToCopy/**/*', dest: 'path/to/imagesDestinationDirectory/'}
        ],
        cleanBeforeBuild: [
            {destroy: 'path/to/directoryToDestroy'}
        ],
        watch: [
            {filesToWatch: 'path/to/sassFiles/**/*.scss', task: ['sass']},
            {filesToWatch: 'path/to/jsFiles/**/*.js', task: ['js']}
        ]
    }
}

Each key inside frontBuilder is an array of paths used in a task, each path in the form of an object with 2 keys, src (source) and dest (destination).

  • js and sass : type : array of objects
    • src : single file path, blob, or array of files path
    • dest : single file path
  • copy and img type : array of objects
    • src : single file path, blob, or array of files path
    • dest : single directory
  • cleanBeforeBuild type : array of objects
    • destroy : single directory
  • watch type : array of objects
    • filesToWatch : single file path or blob
    • task : array of tasks to run (don't modify unless you know what you're doing)

Don't remove keys, keep the global file structure, simply add/modify path.

Or the world will collapse.

You've been warned.

Special extra DevFrontConfig

Create a dfb.env.js file at project root.
Basically this file will be used to run BrowserSync, but you can also override global config if needed (why on earth would you want to do that? i don't know, but anyway, it will work).

This file contains another config object :

var env = {
    /* BrowserSync Config
     /* watch css and js files, if you wish to watch other type of files, add it to the 'files' key
     */
    bs: {
        routing: "www.url-of-your-project.dev",
        portNumber: "2020"
        //files: [basePath+'**!/!*.php', basePath+'**!/!*.html']
    }
    /* and you can do that, too (js will override the js key in dfb.config.js) :
    , js: [
        {src: 'my/personal/src/path', dest: 'my/personal/dest/path' }
    ]*/
}

If you want to run BrowserSync, simply put in your project's url (ex www.url-of-your-project.dev) and a port of your choice (ex 2020), then open www.url-of-your-project.dev:2020.
Browser will now be reloaded on js and scss modification.
Add path files if you want to reload on php/html/whatever modification.

Use DFB

Main commands here, tasks details explained below

general help

$ npm run dfb

build

$ npm run dfb:build

launch clean, js dev, sass dev, copy, img

build:prod

$ npm run dfb:build:prod

launch clean, js prod, sass prod, copy, img

watch

$ npm run dfb:watch

launch build, watch and automatically rebuild modified files

live

$ npm run dfb:live

launch watch and server (reload browser on file modifications - need extra config)

Tasks details

  • js task :
    • DEV : concatenate, generate sourcemaps, stream result to BrowserSync
    • PROD : concatenate, uglify
  • sass task :
    • DEV : concatenate, generate sourcemaps, stream result to BrowserSync
    • PROD : concatenate, minify
  • copy task : simply copy assets from one directory to another (used for fonts, for example)
  • img task : copy images from one directory to another
  • clean : remove build directory before launching other tasks
  • watch task : watch files modifications
  • server : launch BrowserSync to reload pages, need extra config (in dfb.env.js)