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

@skivvy/skivvy-package-browserify

v0.1.4

Published

Compile JavaScript using Browserify

Downloads

2

Readme

Skivvy package: browserify

npm version Stability Build Status

Compile JavaScript using Browserify

Installation

skivvy install browserify

Overview

This package allows you to compile JavaScript using Browserify from within the Skivvy task runner.

Included tasks

browserify

Compile JavaScript using Browserify

Usage:

skivvy run browserify

Configuration settings:

| Name | Type | Required | Default | Description | | ---- | ---- | -------- | ------- | ----------- | | source | string Array<string> | Yes | N/A | Path to source files | | destination | string | Yes | N/A | Path to compiled output file | | options | object | No | {} | Browserify API options | | options.watch | boolean object | No | false | Whether to watch source files for changes using watchify | | options.minify | boolean object | No | false | Whether to minify JS output using the uglifyify transform | | options.env | string object | No | null | Set environment variables and enable envify transform | | options.babelify | boolean object | No | false | Whether to transform JS output using the babelify transform | | options.require | Array<string,object> | No | [] | Files to make available outside the bundle | | options.external | Array<string> | No | [] | Prevent files from being loaded into the current bundle | | options.ignore | Array<string> | No | [] | Prevent files from showing up in the output bundle (return {} when required) | | options.exclude | Array<string> | No | [] | Prevent files from showing up in the output bundle (throw an error when required) | | options.transform | Array<string,object,function> | No | [] | Browserify transforms | | options.plugin | Array<string,object,function> | No | [] | Browserify plugins |

Notes:
  • If the watch configuration setting is a key/value object, that object will be passed as the watchify() function's opts argument

  • If the minify configuration setting is a key/value object, that object will be used as the UglifyJS2 options

  • If the env configuration setting is a string, process.env.NODE_ENV will be set to that value. If it is a key/value object, all the contained values will be assigned to process.env as environment variables

  • If the babelify configuration setting is a key/value object, that object will be used as the babelify options

  • options.require is an array files to make available outside the bundle and any associated options:

    [
    	"./vendor/jquery/jquery.js",
    	"./vendor/d3/d3.js",
    	{
    		"file": "./vendor/angular/angular.js",
    		"options": { "expose": "angular" }
    	}
    ]

    Each entry in options.require will be passed to the b.require() method.

  • options.external is an array of filenames that are prevented from being loaded into the current bundle:

    [
    	"./external/foo.js",
    	"./external/bar.js"
    ]

    Each entry in options.external will be passed to the b.external() method.

  • options.ignore is an array of filenames that are prevented from showing up in the output bundle:

    [
    	"./hidden/foo.js",
    	"./hidden/bar.js"
    ]

    Each entry in options.ignore will be passed to the b.ignore() method.

  • options.exclude is an array of filenames that are prevented from showing up in the output bundle:

    [
    	"./hidden/foo.js",
    	"./hidden/bar.js"
    ]

    Each entry in options.exclude will be passed to the b.exclude() method.

  • options.transform is an array of Browserify transforms and any associated options:

    [
    	"brfs",
    	"envify",
    	{
    		"transform": "babelify",
    		"options": { "nonStandard": false, "comments": false }
    	}
    ]

    If configuration is being set programmatically, transforms can also be specified as functions instead of strings.

    Each entry in options.transforms will be passed to the b.transform() method.

  • options.plugin is an array of Browserify plugins and any associated options:

    [
    	"my-plugin",
    	"another-plugin",
    	{
    		"plugin": "factor-bundle",
    		"options": { "outputs": [ "bundle/x.js", "bundle/y.js" ] }
    	},
    ]

    If configuration is being set programmatically, plugins can also be specified as functions instead of strings.

    Each entry in options.plugin will be passed to the b.plugin() method.

Returns:

Stream.Writable The output stream that is written to the filesystem