{"id":15696975,"url":"https://github.com/zkat/destealify","last_synced_at":"2025-05-08T23:28:34.942Z","repository":{"id":14405329,"uuid":"17116059","full_name":"zkat/destealify","owner":"zkat","description":"Browserify transform for processing StealJS modules","archived":false,"fork":false,"pushed_at":"2015-01-13T08:40:55.000Z","size":260,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T19:21:16.884Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkat.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":"2014-02-23T20:16:01.000Z","updated_at":"2016-06-21T13:20:53.000Z","dependencies_parsed_at":"2022-09-19T02:31:20.106Z","dependency_job_id":null,"html_url":"https://github.com/zkat/destealify","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fdestealify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fdestealify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fdestealify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fdestealify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkat","download_url":"https://codeload.github.com/zkat/destealify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253162602,"owners_count":21863947,"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-03T19:10:35.160Z","updated_at":"2025-05-08T23:28:34.919Z","avatar_url":"https://github.com/zkat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# destealify\n\n[destealify](https://github.com/zkat/destealify) is a\n[browserify](http://browserify.org/) transform that allows free intermixing of\n[StealJS](https://github.com/bitovi/steal) modules with\n[Node.js](http://nodejs.org/)-style CommonJS modules.\n\nIt also supports [webpack](https://webpack.github.io). See\n`examples/canjs-webpack`.\n\n# Quickstart\n\n### Install\n\n    $ npm install destealify\n\n### Examples\n\n#### Command Line\n\n```\nbrowserify -t destealify main.js -o bundle.js\n```\n\n#### API\n\n```javascript\nvar browserify = require('browserify');\nvar fs = require('fs');\n\nvar b = browserify('main.js');\nb.transform('destealify');\n\nb.bundle().pipe(fs.createWriteStream('bundle.js'));\n```\n\n#### package.json\n\nFor packages that are written as StealJS modules, add a browserify\ntransform field to `package.json` and browserify will apply the transform\nto all modules in the package as it builds a bundle.\n\n```\n{\n  \"name\": \"anchor\",\n  \"main\": \"main\",\n  \"browserify\": {\n    \"transform\": \"destealify\"\n  }\n}\n```\n\n### CanJS\n\nUnfortunately, there's no obvious way to use `browserify` directly with the\n`steal` version of [CanJS](http://canjs.com). This is because `browserify` does\nnot recursively transform dependencies, and expects them to do their own\ntransformation, or use the `browserify` field -- which would then need further\nconfiguration for the quirks of how the `CanJS` repo works.\n\nInstead, use [webpack](https://webpack.github.io), which has a similar\nfeatureset to `browserify`. See `examples/canjs-webpack` for details.\n\n### stealconfig.js\n\nMost StealJS modules rely on absolute pathing. There are two ways around this:\n\n0. use symlinks in `node_modules/` to arrange your paths such that `require()`\nworks as expected for the paths in the steal module.\n0. Use a `stealconfig.js` file in a parent directory of your module and use the\n`map` and `paths` options, which are handled by this transform, to map module\nnames as needed.\n\nFor example, if you have a module that looks like:\n\n```js\nsteal(\"frob/this\", function() {\n});\n```\n\n`destealify` will first translate that dependency to `\"frob/this/this.js\"`,\nfollowing StealJS conventions.\n\nIf your `this.js` library is located in\n`./bower_components/frobjs/this/index.js`, you can write a stealconfig.js in\nyour project's root that looks like:\n\n```js\nsteal.config({\n  map: {\n    \"*\": {\n      \"frob/this/this.js\": \"thisjs\"\n    }\n  },\n  paths: {\n    \"thisjs\": \"bower_components/frobjs/this\"\n  }\n});\n```\n\nand everything will be taken care of for you.\n\n### License\n\n`destealify` is a public domain work, dedicated using\n[CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). Feel free to do\nwhatever you want with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkat%2Fdestealify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkat%2Fdestealify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkat%2Fdestealify/lists"}