{"id":28566455,"url":"https://github.com/js-devtools/simplifyify","last_synced_at":"2026-03-08T21:02:05.358Z","repository":{"id":35320750,"uuid":"39582536","full_name":"JS-DevTools/simplifyify","owner":"JS-DevTools","description":"A simplified Browserify and Watchify CLI","archived":false,"fork":false,"pushed_at":"2021-01-02T18:28:11.000Z","size":1010,"stargazers_count":37,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-11T12:48:50.532Z","etag":null,"topics":["browserify","cli","code-coverage","cross-platform","linux","macos","minify","nodejs","sourcemap","watchify","windows"],"latest_commit_sha":null,"homepage":"https://jstools.dev/simplifyify/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JS-DevTools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-23T17:55:22.000Z","updated_at":"2023-07-27T12:00:53.000Z","dependencies_parsed_at":"2022-09-17T06:30:51.555Z","dependency_job_id":null,"html_url":"https://github.com/JS-DevTools/simplifyify","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fsimplifyify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fsimplifyify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fsimplifyify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fsimplifyify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JS-DevTools","download_url":"https://codeload.github.com/JS-DevTools/simplifyify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fsimplifyify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259098639,"owners_count":22804794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browserify","cli","code-coverage","cross-platform","linux","macos","minify","nodejs","sourcemap","watchify","windows"],"created_at":"2025-06-10T15:10:59.977Z","updated_at":"2026-03-08T21:02:00.305Z","avatar_url":"https://github.com/JS-DevTools.png","language":"JavaScript","readme":"Simplifyify\n============================\n#### A simplified Browserify and Watchify CLI\n\n[![Cross-Platform Compatibility](https://jstools.dev/img/badges/os-badges.svg)](https://github.com/JS-DevTools/simplifyify/actions)\n[![Build Status](https://github.com/JS-DevTools/simplifyify/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/simplifyify/actions)\n\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/simplifyify/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/simplifyify?branch=master)\n[![Dependencies](https://david-dm.org/JS-DevTools/simplifyify.svg)](https://david-dm.org/JS-DevTools/simplifyify)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/simplifyify.svg)](https://www.npmjs.com/package/@jsdevtools/simplifyify)\n[![License](https://img.shields.io/npm/l/@jsdevtools/simplifyify.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/JS-DevTools/simplifyify)\n\nI constantly find myself using the same Browserify plug-ins and transforms on every project, and I always end up writing pretty much the same Gulp script over and over again.  Simplifyify is the solution to that problem.\n\n\n\nFeatures\n--------------------------\n- Supports [globs](https://github.com/isaacs/node-glob#glob-primer), even on Windows\n- Supports Browserify [transforms](#browserify-transforms) and [plugins](#browserify-plugins), such as Babel, CoffeeScript, TypeScript, etc.\n- Built-in support for TypeScript. Enabled automatically if the entry file has a `.ts` or `.tsx` extension\n- Has a programmatic [API](#api), for use with build tools like Grunt, Gulp, Broccoli, etc.\n- Bundle everything into one big file, or create different bundles for each part of your app (see [examples below](#examples))\n- Add a banner with version, date, license, etc. via [browserify-banner](https://www.npmjs.com/package/browserify-banner)\n- One command creates all the files you need:\n    - `--bundle` bundles your code and nothing else. Useful during development\n    - `--debug` creates _external_ source-maps (`.map`) using [exorcist](https://www.npmjs.com/package/exorcist)\n    - `--minify` shrinks your code using [uglifyify](https://www.npmjs.com/package/uglifyify) _and_ [Uglify-ES](https://github.com/mishoo/UglifyJS2/tree/harmony)\n    - `--coverage` adds code-coverage instrumentation using [istanbul](https://istanbul.js.org/)\n    - `--watch` uses [watchify](https://www.npmjs.com/package/watchify) for _fast_ differential re-builds as files change\n\n\nRelated Projects\n--------------------------\n- [globify](https://jstools.dev/globify)\u003cbr\u003e\n  Run browserify and watchify with globs - even on Windows\n\n- [sourcemapify](https://jstools.dev/sourcemapify)\u003cbr\u003e\n  Sourcemap plugin for Browserify\n\n- [browserify-banner](https://jstools.dev/browserify-banner)\u003cbr\u003e\n  Add a comment (and/or code) to the top of your Browserify bundle\n\n\n\nInstallation\n--------------------------\nInstall using [npm](https://docs.npmjs.com/about-npm/):\n\n```bash\nnpm install @jsdevtools/simplifyify\n```\n\n\nUsage\n--------------------------\n```\nUsage: simplifyify [options] \u003csource-files...\u003e\n\nOptions:\n\n  -b, --bundle              Create a non-minified bundle (*.js) for each source file.\n                            This is the default if no other output option is set.\n\n  -m, --minify              Create a minified bundle (*.min.js) for each source file.\n\n  -c, --coverage            Create a bundle with code-coverage instrumentation\n                            (*.coverage.js) for each source file.\n\n  -d, --debug               Create a source map (*.js.map) for each bundle\n\n  -w, --watch               Watch source file(s) and rebuild the bundle(s) automatically\n\n  -o, --outfile \u003cfilespec\u003e  The output file or directory.\n                            May include a filename pattern (e.g. \"*.bundle.js\")\n\n  -x, --exclude \u003cfilespec\u003e  File path or glob pattern to exclude.\n                            Don't forget to put quotes around glob patterns\n\n  -s, --standalone \u003cname\u003e   Export as a named UMD bundle (e.g. \"my.cool.module\")\n                            May include a wildcard (e.g. \"MyLib.*\")\n\nArguments:\n\n  \u003csource-files...\u003e         One or more file paths and/or glob patterns.\n                            Don't forget to put quotes around glob patterns.\n                            A separate Browserify bundle will be created\n                            for each source file.\n```\n\n\nExamples\n--------------------------\n#### One entry file --\u003e one output file\nIn the simplest usage, you can use Simplifyify to bundle all of your code into a single file:\n\n```bash\nsimplifyify src/index.js\n\nsrc/index.js --\u003e src/index.bundle.js                # \u003c-- unminified code\n```\n\nBy default, the output file is at the same path as the entry file, but with a `.bundle.js` extension.  You can customize this using the `--outfile` argument:\n\n```bash\nsimplifyify src/index.js --outfile dist/my-package.js\n\nsrc/index.js --\u003e dist/my-package.js                 # \u003c-- unminified code\n```\n\nIf you want the bundled code to be minified, then add the `--minify` flag:\n\n```bash\nsimplifyify src/index.js --outfile dist/my-package.js --minify\n\nsrc/index.js --\u003e dist/my-package.js                 # \u003c-- minified code\n```\n\nWhat if you also want a source map (`.map`) file?  Just add the `--debug` flag.\n\n```bash\nsimplifyify src/index.js --outfile dist/my-package.js --minify --debug\n\nsrc/index.js --\u003e dist/my-package.js                 # \u003c-- minified code\nsrc/index.js --\u003e dist/my-package.js.map             # \u003c-- source map\n```\n\n\n\n#### One entry file --\u003e multiple output files\nSimplifyify can output multiple bundles of your code in a single command.  Let's say you want to create an unminified bundle for development (with a source map), a minified bundle for production (with a source map), and a test bundle (with code-coverage instrumentation) for testing:\n\n```bash\nsimplifyify src/index.js --outfile dist/my-package.js --bundle --debug --minify --coverage\n\nsrc/index.js --\u003e dist/my-package.js                 # \u003c-- unminified code\nsrc/index.js --\u003e dist/my-package.js.map             # \u003c-- source map\nsrc/index.js --\u003e dist/my-package.min.js             # \u003c-- minified code\nsrc/index.js --\u003e dist/my-package.min.js.map         # \u003c-- source map\nsrc/index.js --\u003e dist/my-package.coverage.js        # \u003c-- code-coverage\n```\n\n\n\n#### Multiple entry files --\u003e multiple output files _for each_\nIn many applications, it doesn't make sense for _all_ of your code to be bundled into one huge file.  Maybe you want to create separate bundles for each folder, or for each component or section of your app.  Simplifyify makes this easy.  It will create separate bundles for each entry file that you specify.  For example:\n\n```bash\nsimplifyify src/store.js src/cart.js src/checkout.js --outfile dist --bundle --minify --debug\n\nsrc/store.js --\u003e dist/store.js                      # \u003c-- unminified code\nsrc/store.js --\u003e dist/store.js.map                  # \u003c-- source map\nsrc/store.js --\u003e dist/store.min.js                  # \u003c-- minified code\nsrc/store.js --\u003e dist/store.min.js.map              # \u003c-- source map\nsrc/cart.js --\u003e dist/cart.js                        # \u003c-- unminified code\nsrc/cart.js --\u003e dist/cart.js.map                    # \u003c-- source map\nsrc/cart.js --\u003e dist/cart.min.js                    # \u003c-- minified code\nsrc/cart.js --\u003e dist/cart.min.js.map                # \u003c-- source map\nsrc/checkout.js --\u003e dist/checkout.js                # \u003c-- unminified code\nsrc/checkout.js --\u003e dist/checkout.js.map            # \u003c-- source map\nsrc/checkout.js --\u003e dist/checkout.min.js            # \u003c-- minified code\nsrc/checkout.js --\u003e dist/checkout.min.js.map        # \u003c-- source map\n```\n\nSpecifying each entry file can quickly become cumbersome though.  That's where [globs](https://github.com/isaacs/node-glob#glob-primer) come in.  You can specify one or more globs, and Simplifyify will create a separate bundle for each file that matches the glob pattern.  For example:\n\n```bash\nsimplifyify \"src/*/index.js\" --outfile \"dist/*.bundle.js\" --bundle --minify --debug\n\nsrc/store/index.js --\u003e dist/store/index.bundle.js               # \u003c-- unminified code\nsrc/store/index.js --\u003e dist/store/index.bundle.js.map           # \u003c-- source map\nsrc/store/index.js --\u003e dist/store/index.bundle.min.js           # \u003c-- minified code\nsrc/store/index.js --\u003e dist/store/index.bundle.min.js.map       # \u003c-- source map\nsrc/cart/index.js --\u003e dist/cart/index.bundle.js                 # \u003c-- unminified code\nsrc/cart/index.js --\u003e dist/cart/index.bundle.js.map             # \u003c-- source map\nsrc/cart/index.js --\u003e dist/cart/index.bundle.min.js             # \u003c-- minified code\nsrc/cart/index.js --\u003e dist/cart/index.bundle.min.js.map         # \u003c-- source map\nsrc/checkout/index.js --\u003e dist/checkout/index.bundle.js         # \u003c-- unminified code\nsrc/checkout/index.js --\u003e dist/checkout/index.bundle.js.map     # \u003c-- source map\nsrc/checkout/index.js --\u003e dist/checkout/index.bundle.min.js     # \u003c-- minified code\nsrc/checkout/index.js --\u003e dist/checkout/index.bundle.min.js.map # \u003c-- source map\n```\n\n\u003e **TIP:** Don't forget to put quotes around your glob patterns! Otherwise, some shells (e.g. Bash) will try to expand them themselves, which may or may not work\n\n\n\nBrowserify Transforms\n--------------------------\nSimplifyify honors the [`browserify.transform`](https://github.com/substack/node-browserify#browserifytransform) field in your `package.json` file.  For example, the following configuration uses [Babelify](https://github.com/babel/babelify) to transform your ES6 code to ES5:\n\n```json\n{\n  \"name\": \"my-package\",\n  \"version\": \"1.2.3\",\n  \"browserify\": {\n    \"transform\": [\"babelify\"]\n  },\n  \"devDependencies\": {\n    \"babelify\": \"^10.0.0\"\n  }\n}\n```\n\nYou can also specify options for your transforms.  The exact options depend on the transform you're using.  Here's an example that configures [Babelify](https://github.com/babel/babelify) and also modifies Simplifyify's default config for [uglifyify](https://www.npmjs.com/package/uglifyify):\n\n```json\n{\n  \"name\": \"my-package\",\n  \"version\": \"1.2.3\",\n  \"browserify\": {\n    \"transform\": [\n      [\"babelify\", {\n        \"presets\": [\"@babel/preset-env\"]\n      }],\n      [\"uglifyify\", {\n        \"mangle\": true,\n        \"compress\": {\n          \"sequences\": true,\n          \"dead_code\": true,\n          \"booleans\": true,\n          \"conditionals\": true,\n          \"if_return\": false,\n          \"drop_console\": false,\n          \"keep_fnames\": true\n        },\n        \"output\": {\n          \"comments\": false\n        }\n      }]\n    ]\n  },\n  \"devDependencies\": {\n    \"@babel/preset-env\": \"^7.0.0\",\n    \"babelify\": \"^10.0.0\"\n  }\n}\n```\n\n\n\nBrowserify Plugins\n--------------------------\nThe same technique described above for Browserify transforms also works for Browserify plugins.  Just add a `browserify.plugins` field to your `package.json` file.  For example, the following configuration configures [TSify](https://github.com/TypeStrong/tsify/) to transpile your TypeScript code, and [browserify-banner](https://github.com/JS-DevTools/browserify-banner) to add a banner comment to the top of your output file(s).\n\n```json\n{\n  \"name\": \"my-package\",\n  \"version\": \"1.2.3\",\n  \"browserify\": {\n    \"plugins\": [\n      [\"browserify-banner\", {\n        \"template\": \"\u003c%= pkg.name %\u003e v\u003c%= pkg.version %\u003e\"\n      }],\n      [\"tsify\", {\n        \"target\": \"esnext\",\n        \"module\": \"commonjs\",\n        \"moduleResolution\": \"node\",\n        \"jsx\": \"react\"\n      }]\n    ]\n  },\n  \"devDependencies\": {\n    \"typescript\": \"^3.0.3\"\n  }\n}\n```\n\n\n\nAPI\n--------------------------\nSimplifyify also has a programmatic API, so you can use it directly in your build scripts (Gulp, Grunt, Broccoli, etc.)\n\n[Here's the API definition](https://github.com/JS-DevTools/simplifyify/blob/6709bb5bbf59b327b4ced3e833078de8db006b5a/lib/index.js#L9-L28), and [here's a full example](https://github.com/JS-DevTools/simplifyify/blob/6709bb5bbf59b327b4ced3e833078de8db006b5a/bin/simplifyify.js#L71-L102). Just pass an array of strings (file paths and/or glob patterns) and an options param.  You get back an [`EventEmitter`](https://nodejs.org/api/events.html#events_class_events_eventemitter), which fires all the Browserify \u0026amp; Watchify events.\n\n```javascript\nvar simplifyify = require(\"@jsdevtools/simplifyify\");\n\ngulp.task(\"browserify\", function(done) {\n  simplifyify(\"lib/*.module.js\",\n    {\n        outfile: \"dist/*.bundle.js\",\n        debug: true,\n        minify: true\n    })\n    .on(\"end\", function() {\n        // Finished successfully!\n        done();\n    })\n    .on(\"error\", function(err) {\n        // Something went wrong\n        done(err);\n    });\n});\n```\n\n\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/JS-DevTools/simplifyify/issues) on GitHub and [submit a pull request](https://github.com/JS-DevTools/simplifyify/pulls).\n\n#### Building\nTo build the project locally on your computer:\n\n1. __Clone this repo__\u003cbr\u003e\n`git clone https://github.com/JS-DevTools/simplifyify.git`\n\n2. __Install dependencies__\u003cbr\u003e\n`npm install`\n\n3. __Run the tests__\u003cbr\u003e\n`npm test`\n\n\n\nLicense\n--------------------------\nSimplifyify is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.\n\nThis package is [Treeware](http://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/JS-DevTools/simplifyify) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![GitHub](https://jstools.dev/img/badges/github.svg)](https://github.com/open-source)\n[![NPM](https://jstools.dev/img/badges/npm.svg)](https://www.npmjs.com/)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n[![Travis CI](https://jstools.dev/img/badges/travis-ci.svg)](https://travis-ci.com)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fsimplifyify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-devtools%2Fsimplifyify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fsimplifyify/lists"}