{"id":26100738,"url":"https://github.com/eploko/broccoli-watchify","last_synced_at":"2025-04-12T15:10:42.909Z","repository":{"id":23353140,"uuid":"26714008","full_name":"eploko/broccoli-watchify","owner":"eploko","description":"Watchify plugin for Broccoli.","archived":false,"fork":false,"pushed_at":"2022-12-03T04:24:16.000Z","size":233,"stargazers_count":6,"open_issues_count":17,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T09:44:55.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/eploko.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-11-16T12:52:44.000Z","updated_at":"2022-12-06T13:17:09.000Z","dependencies_parsed_at":"2023-01-13T23:10:33.842Z","dependency_job_id":null,"html_url":"https://github.com/eploko/broccoli-watchify","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eploko%2Fbroccoli-watchify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eploko%2Fbroccoli-watchify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eploko%2Fbroccoli-watchify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eploko%2Fbroccoli-watchify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eploko","download_url":"https://codeload.github.com/eploko/broccoli-watchify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586231,"owners_count":21128997,"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":[],"created_at":"2025-03-09T17:52:53.490Z","updated_at":"2025-04-12T15:10:42.890Z","avatar_url":"https://github.com/eploko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# broccoli-watchify [![Build Status](https://travis-ci.org/eploko/broccoli-watchify.svg)](https://travis-ci.org/eploko/broccoli-watchify)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eploko/broccoli-watchify?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nThe broccoli-watchify plugin bundles your assets with\n[watchify](https://github.com/substack/watchify).\n\n## Installation\n\n```bash\nnpm install --save-dev broccoli-watchify\n```\n\n## Example\n\n```js\nconst watchify = require('broccoli-watchify');\n\nconst options = {\n  browserify: {\n    entries: ['./app.js'],\n    debug: true\n  },\n  nodeModulesPath: process.cwd() + '/node_modules', // provide the node_modules you want to resolve from\n  outputFile: 'bundled/app.js',\n  cache: true,\n  init: function (b) {\n    b.transform('reactify', {'es6': true});\n    b.external('$');\n  }\n};\n\nconst tree = watchify(tree, options);\n```\n\n## API\n\n### watchify(tree, options)\n\n* `tree`: A [broccoli tree](https://github.com/broccolijs/broccoli#plugin-api-specification) or a directory path as a string\n\n#### Options\n\n* `browserify`: (defaults to `{}`) Options passed to the [browserify constructor](https://github.com/substack/node-browserify#var-b--browserifyfiles-or-opts)\n* `outputFile`: (defaults to `\"./browserify.js\"`) Output file\n* `cache`: (defaults to `true`) A boolean flag to potentially switch the caching off and act like a plain browserify. Can be helpful in assembling bundles for production and _not_ including all the full local path names in the bundle, which is not possible in the watchify mode.\n* `init`: (defaults to a no-op) A callback function that receives the browserify instance after it's created. Use this to call any of the [browserify API methods](https://github.com/substack/node-browserify#methods) on the instance, including `add`, `require`, `external`, `exclude` and so on.\n* `nodeModulesPath`: (defaults to `process.cwd()/node_modules`) Absolute path to node_modules.\n\n## Changelog\n\n### 2.0.0\n\n* expose a way to configure which node_modules to resolve from\n* support broccoli 1x and 2x\n* modernize codebase\n* upgrade dependencies\n\n### 1.0.0\n\n* No longer use watchify directly, as we do not require its watcher and it is not configurable. Rather we populate the cache, the same way watchify does.\n* Stable output, so downstream plugins aren't invalidated if our output doesn't change.\n* Much faster.\n* Basic tests.\n* Browserified files are browserified relative to the broccoli `inputPath`, not the realpath.\n\n### 0.2.0\n\n* Add the `init` option to provide a possibility of configuration of the browserify instance with a custom function.\n* Remove the `entries` and `require` options.\n* Add the `cache` option to turn off the watchify behavior and act like a plain browserify.\n\n### 0.1.3\n\n* Initial release\n\n## Contributors\n\nThe code of this plugin is originally based on the [broccoli-browserify](https://github.com/gingerhendrix/broccoli-browserify) plugin by [Gareth Andrew](http://github.com/gingerhendrix).\n\n## License\n\nThe MIT License (MIT). See [LICENSE](LICENSE) for details.\n\nCopyright © 2014 Andrey Subbotin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feploko%2Fbroccoli-watchify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feploko%2Fbroccoli-watchify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feploko%2Fbroccoli-watchify/lists"}