{"id":18043291,"url":"https://github.com/js-devtools/globify","last_synced_at":"2025-04-09T22:04:18.682Z","repository":{"id":33634756,"uuid":"37287107","full_name":"JS-DevTools/globify","owner":"JS-DevTools","description":"Run browserify and watchify with globs - even on Windows!","archived":false,"fork":false,"pushed_at":"2020-07-16T13:55:23.000Z","size":1266,"stargazers_count":16,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T22:04:11.401Z","etag":null,"topics":["browserify","cli","cross-platform","glob-pattern","globs","linux","macos","nodejs","windows"],"latest_commit_sha":null,"homepage":"https://jstools.dev/globify/","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-06-11T21:27:05.000Z","updated_at":"2022-07-06T19:42:05.000Z","dependencies_parsed_at":"2022-09-13T04:24:43.434Z","dependency_job_id":null,"html_url":"https://github.com/JS-DevTools/globify","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fglobify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fglobify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fglobify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Fglobify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JS-DevTools","download_url":"https://codeload.github.com/JS-DevTools/globify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119296,"owners_count":21050755,"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","cross-platform","glob-pattern","globs","linux","macos","nodejs","windows"],"created_at":"2024-10-30T17:08:00.547Z","updated_at":"2025-04-09T22:04:18.660Z","avatar_url":"https://github.com/JS-DevTools.png","language":"JavaScript","readme":"Globify\n============================\n#### Run browserify and watchify with globs - even on Windows!\n\n[![Cross-Platform Compatibility](https://jstools.dev/img/badges/os-badges.svg)](https://github.com/JS-DevTools/globify/actions)\n[![Build Status](https://github.com/JS-DevTools/globify/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/globify/actions)\n\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/globify/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/globify)\n[![Dependencies](https://david-dm.org/JS-DevTools/globify.svg)](https://david-dm.org/JS-DevTools/globify)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/globify.svg)](https://www.npmjs.com/package/@jsdevtools/globify)\n[![License](https://img.shields.io/npm/l/@jsdevtools/globify.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/JS-DevTools/globify)\n\n\n\nFeatures\n--------------------------\n* Supports [glob patterns](https://github.com/isaacs/node-glob#glob-primer) for entry files - even on Windows\n* Optionally create separate browserify bundles for each entry file\n\n\nRelated Projects\n--------------------------\n- [simplifyify](https://jstools.dev/simplifyify)\u003cbr\u003e\n  A simplified Browserify and Watchify CLI\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/).  Add the `-g` flag to install globally so you can use it from any terminal.\n\n```bash\nnpm install -g @jsdevtools/globify\n```\n\n\nUsage\n--------------------------\nThe command-line interface is identical to [browserify](https://github.com/substack/node-browserify#usage) and [watchify](https://github.com/substack/watchify#usage).  In fact, globify simply passes your arguments straight to browserify or watchify (after expanding the glob pattern).\n\n```\nglobify \u003centry files glob\u003e  [options]\n\nOptions:\n\n  \u003centry files glob\u003e\n\n    Glob pattern of entry files. Don't forget to wrap the glob pattern in quotes,\n    otherwise some shells (like bash) will pre-expand the glob.\n\n  --outfile=FILE, -o FILE\n\n    If outfile is a file, then a single bundle will be created.  If it's a directory,\n    then separate bundles will be created for each entry file.  You can also specify\n    an output filename pattern, like *.bundled.js\n\n  --exclude=GLOB, -u GLOB\n\n    Excludes files that are matched by the \u003centry files glob\u003e\n\n  --watch, -w\n\n    Call watchify instead of browserify.\n```\n\n\nExamples\n--------------------------\nFor all of these examples, assume that we have a file structure like this:\n\n```\nlib/\n |__ my-entry-file.js\n |__ some-file.js\n |__ other-file.js\n |__ other-entry-file.js\n |__ subdir/\n       |__ another-entry-file.js\n       |__ another-file.js\n       |__ yet-another-file.js\n```\n\n#### Multiple files in one bundle\nWe want to bundle all three entry files into a single bundle file.  We can do that with the following command:\n\n```\nglobify \"lib/**/*-entry-file.js\" --outfile=dist/my-bundle.js\n```\n\nGlobify will call `browserify` once, passing it the three matching entry files and one bundle file:\n\n```\nbrowserify lib/my-entry-file.js lib/other-entry-file.js lib/subdir/another-entry-file.js --outfile=dist/my-bundle.js\n```\n\n#### Multiple files, multiple bundles\nWe want to create separate bundle files for each of the three entry files.  We can do that with the following command:\n\n```\nglobify \"lib/**/*-entry-file.js\" --outfile=dist\n```\n\nGlobify will call `browserify` three times (once for each entry file), and create three corresponding bundles:\n\n```\nbrowserify lib/my-entry-file.js --outfile=dist/my-entry-file.js\nbrowserify lib/other-entry-file.js --outfile=dist/other-entry-file.js\nbrowserify lib/subdir/another-entry-file.js --outfile=dist/subdir/another-entry-file.js\n```\n\n#### Multiple files, multiple bundles with customized names\nWe want to create separate bundle files for each of the three entry files, but we weant each bundle file to have a `.bundled.js` suffix.  We can do that with the following command:\n\n```\nglobify \"lib/**/*-entry-file.js\" -o \"dist/*.bundled.js\"\n```\n\nGlobify will call `browserify` three times (once for each entry file) and create three corresponding bundles:\n\n```\nbrowserify lib/my-entry-file.js -o dist/my-entry-file.bundled.js\nbrowserify lib/other-entry-file.js -o dist/other-entry-file.bundled.js\nbrowserify lib/subdir/another-entry-file.js -o dist/subdir/another-entry-file.bundled.js\n```\n\n#### Watchify, transforms, other options\nNow, let's try it with watchify instead.  Let's also add some extra options, and run the `uglifyify` transforms to minify the bundles. And let's give the bundles a `.bundled.min.js` suffix.\n\n```\nglobify -g uglifyify \"lib/**/*-entry-file.js\" -w -v -d -o \"dist/*.bundled.min.js\"\n```\n\nGlobify will call `watchify` (because of the `-w` option) three times with all of the specified options:\n\n```\nwatchify -g uglifyify lib/my-entry-file.js -v -d -o dist/my-entry-file.bundled.min.js\nwatchify -g uglifyify lib/other-entry-file.js -v -d -o dist/other-entry-file.bundled.min.js\nwatchify -g uglifyify lib/subdir/another-entry-file.js -v -d -o dist/subdir/another-entry-file.bundled.min.js\n```\n\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/JS-DevTools/globify/issues) on GitHub and [submit a pull request](https://github.com/JS-DevTools/globify/pulls).\n\n#### Building/Testing\nTo build/test the project locally on your computer:\n\n1. __Clone this repo__\u003cbr\u003e\n`git clone https://github.com/JS-DevTools/globify.git`\n\n2. __Install dependencies__\u003cbr\u003e\n`npm install`\n\n3. __Run the tests__\u003cbr\u003e\n`npm test`\n\n\nLicense\n--------------------------\nGlobify 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/globify) 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[![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[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fglobify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-devtools%2Fglobify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Fglobify/lists"}