{"id":15546891,"url":"https://github.com/twooster/jswrap-brunch","last_synced_at":"2026-05-16T11:02:23.748Z","repository":{"id":57286542,"uuid":"110540603","full_name":"twooster/jswrap-brunch","owner":"twooster","description":"JS File Wrapper Plugin for Brunch","archived":false,"fork":false,"pushed_at":"2017-11-13T12:25:11.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-16T09:39:32.526Z","etag":null,"topics":["brunch","brunch-plugin","javascript","npm-package"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twooster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-13T11:35:24.000Z","updated_at":"2017-11-16T11:36:51.000Z","dependencies_parsed_at":"2022-09-09T23:10:19.366Z","dependency_job_id":null,"html_url":"https://github.com/twooster/jswrap-brunch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twooster/jswrap-brunch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twooster%2Fjswrap-brunch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twooster%2Fjswrap-brunch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twooster%2Fjswrap-brunch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twooster%2Fjswrap-brunch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twooster","download_url":"https://codeload.github.com/twooster/jswrap-brunch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twooster%2Fjswrap-brunch/sbom","scorecard":{"id":904365,"data":{"date":"2025-08-18","repo":{"name":"github.com/twooster/jswrap-brunch","commit":"c316808620fbfba7eb4234c5305821537134f56f"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.6,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T16:48:08.966Z","repository_id":57286542,"created_at":"2025-08-24T16:48:08.966Z","updated_at":"2025-08-24T16:48:08.966Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["brunch","brunch-plugin","javascript","npm-package"],"created_at":"2024-10-02T13:05:15.763Z","updated_at":"2026-05-16T11:02:23.719Z","avatar_url":"https://github.com/twooster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jswrap-brunch\n\nHelps you wrap `.js` files with custom wrapper code before passing\nit through to the rest of the pipeline.\n\n## Installation\n\n### npm\n\n`npm install jswrap-brunch --save-dev`\n\n### yarn\n\n`yarn add --dev jswrap-brunch`\n\n## Usage\n\nConfigure by setting the `jsWrap` key in `plugins` in your `brunch-config.js`\nfile. Its structure is as follows:\n\n\n```javascript\n// brunch-config.js\n\n{\n  plugins: {\n    jsWrap: {\n      debug: [Boolean],\n      wrappers: [\n        {\n          match: \u003cArray[RegExp | String] | Regexp | String\u003e,\n          wrap: \u003cFunction(fileContents: String): String\u003e,\n          halt: [Boolean]\n        },\n        ...\n      ]\n    },\n    ...\n  },\n  ...\n}\n```\n\n\n`wrappers` is an array of objects defining match/wrap rules. Its attributes\nare:\n\n* `match`: a string, a regexp, or an array of strings/regexps which will\n  be used a filename tester. If any tester matches, the wrap proceeds.\n* `wrap`: a function that takes the file contents and returns wrapped file\n  contents.\n* `halt`: a boolean indicating whether further matches shouldn't be considered\n  after this one.\n\n`debug` is a boolean value that will dump a bunch of matching information\nto the console if truthy to help you debug problems.\n\n\n## Motivation\n\nI built this tool while trying to integrate the [Stanford Javascript\nCrypto Library](https://github.com/bitwiseshiftleft/sjcl) into my\nbuild pipeline.\n\nThe SJCL has its own build process using configuration for inclusion\nof given features, makefiles, etc, and doesn't use standard CommonJS or ES6\nexport functionality. Rather than have compilation be part of my build\npipeline, I decided it would be nicer if I could wrap their files at build time\nto create proper JS modules.\n\n### SJCL Example\n\nThis is how I used the `jswrap-brunch` plugin to suit my needs of combining and\nwrapping the SJCL into a more modern module:\n\n* Install `jswrap-brunch` plugin as `npm install\n* Enable it as an npm compiler in `brunch-config.js`:\n\n  ```javascript\n  // in brunch-config.js\n\n  npm: {\n    compilers: [\"jswrap-brunch\"],\n    ...\n  }\n  ```\n\n  Note that this used to be under the `plugins.npm` key which is now\n  deprecated, despite the [brunch documentation](http://brunch.io/docs/config#-npm-).\n\n* Set up the following rules for the plugin:\n\n  ```javascript\n  // in brunch-config.js\n\n  plugins: {\n    jsWrap: {\n      wrappers: [\n        {\n          wrap: data =\u003e `\n            ${data}\n            module.exports = sjcl;\n          `,\n          match: /node_modules\\/sjcl\\/core\\/sjcl\\.js$/,\n          halt: true\n        },\n        {\n          wrap: data =\u003e `\n            (function(sjcl) {\n            ${data}\n            })(require(\"./sjcl\"));\n          `,\n          match: /node_modules\\/sjcl\\/core\\/.*\\.js$/\n        }\n      ]\n    },\n    ...\n  }\n  ```\n\n* Create a manifest javascript file in my project code:\n\n  ```javascript\n  // js/sjcl-wrapper.js\n\n  import sjcl from \"sjcl/core/sjcl\";\n  import \"sjcl/core/aes\"; // side effects on core sjcl module\n  import \"sjcl/core/cbc\";\n  // ... etc ...\n\n  export default sjcl;\n  ```\n\n* Now you can import and interact with \"custom builds\" of the SJCL\n  without actually engaging with its build pipeline.\n\n## License\n\nMIT, go nuts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwooster%2Fjswrap-brunch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwooster%2Fjswrap-brunch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwooster%2Fjswrap-brunch/lists"}