{"id":17398444,"url":"https://github.com/vweevers/jscriptify","last_synced_at":"2025-04-30T05:22:20.338Z","repository":{"id":57284120,"uuid":"54326980","full_name":"vweevers/jscriptify","owner":"vweevers","description":"require() for Windows JScript","archived":false,"fork":false,"pushed_at":"2016-03-26T12:58:43.000Z","size":5,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T01:58:21.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/vweevers.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":"2016-03-20T16:07:19.000Z","updated_at":"2025-02-25T07:27:29.000Z","dependencies_parsed_at":"2022-09-10T09:56:16.551Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/jscriptify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fjscriptify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fjscriptify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fjscriptify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fjscriptify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/jscriptify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251645987,"owners_count":21620847,"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":"2024-10-16T14:56:33.093Z","updated_at":"2025-04-30T05:22:20.196Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jscriptify\r\n\r\n**Make a bundle for [JScript](https://en.wikipedia.org/wiki/JScript), so you can `require()` stuff from your script. Like [browserify](https://github.com/substack/node-browserify#readme), but targeted at the [Windows Script Host](https://en.wikipedia.org/wiki/Windows_Script_Host) engine.** Roughly equivalent to:\r\n\r\n```bash\r\nbrowserify --bare input.js | uglifyjs \\\r\n  --preamble this.global=this.window=this;\r\n```\r\n\r\n[![npm status](http://img.shields.io/npm/v/jscriptify.svg?style=flat-square)](https://www.npmjs.org/package/jscriptify)\r\n\r\n## cli\r\n\r\nThree ways to do the same thing:\r\n\r\n```bash\r\njscriptify lib/input.js \u003e lib/bundle.js\r\njscriptify --basedir lib \u003c lib/input.js \u003e lib/bundle.js\r\njscriptify --cwd lib input.js --output bundle.js\r\n```\r\n\r\nThe `cwd` parameter affects input and output location as well as the `basedir`, which is passed to browserify. The `basedir`, `cwd` and `output` parameters are aliased as `b`, `c` and `o`:\r\n\r\n```bash\r\njscriptify -b lib \u003c lib/input.js \u003e lib/bundle.js\r\njscriptify -c lib input.js -o bundle.js\r\n```\r\n\r\nTo run a bundled script: `cscript bundle.js`\r\n\r\nI might include polyfills in the future, but I decided against it for now because it needs to be selective; just throwing `es5-shim` in there can slow a script down by 10%. If you need JSON support, I found [json3](http://bestiejs.github.io/json3/) works well:\r\n\r\n```js\r\nvar JSON = require('json3')\r\nvar json = JSON.stringify({ beep: 'boop' })\r\nWScript.StdOut.Write(json)\r\n```\r\n\r\n## install\r\n\r\nWith [npm](https://npmjs.org) do:\r\n\r\n```\r\nnpm install -g jscriptify\r\n```\r\n\r\n## license\r\n\r\n[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fjscriptify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fjscriptify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fjscriptify/lists"}