{"id":13510295,"url":"https://github.com/yue/yackage","last_synced_at":"2025-08-21T00:31:10.442Z","repository":{"id":57402792,"uuid":"126006866","full_name":"yue/yackage","owner":"yue","description":"Package your Node.js project into an executable","archived":false,"fork":false,"pushed_at":"2023-07-09T00:56:24.000Z","size":642,"stargazers_count":103,"open_issues_count":9,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-11T12:12:02.501Z","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":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yue.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,"governance":null}},"created_at":"2018-03-20T11:26:56.000Z","updated_at":"2024-06-07T23:21:43.000Z","dependencies_parsed_at":"2022-09-09T20:00:51.151Z","dependency_job_id":"f817b21f-3add-43df-915e-41d1cde149a0","html_url":"https://github.com/yue/yackage","commit_stats":{"total_commits":78,"total_committers":3,"mean_commits":26.0,"dds":0.02564102564102566,"last_synced_commit":"98a753da43fab93b117bf444fc6cd4a7434674b2"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yue%2Fyackage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yue%2Fyackage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yue%2Fyackage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yue%2Fyackage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yue","download_url":"https://codeload.github.com/yue/yackage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229998137,"owners_count":18157188,"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-08-01T02:01:32.406Z","updated_at":"2024-12-19T17:09:14.079Z","avatar_url":"https://github.com/yue.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# yackage\n\nPackage your Node.js project into an executable.\n\nThis project is targeted for apps built with [Yue library][yue] and\n[Yode Node.js runtime][yode].\n\n## Install\n\n```\nnpm i -g yackage\n```\n\n## Usage\n\n```\nUsage: yackage [options] [command]\n\nOptions:\n\n  --platform \u003cplatform\u003e          Target platform (default: $npm_config_platform ||\n                                 process.platform)\n  --arch \u003carch\u003e                  Target arch (default: $npm_config_arch ||\n                                 process.arch)\n  --app-dir \u003cdir\u003e                Path to the source code dir of app (default:\n                                 current working dir)\n  --unpack \u003cpattern\u003e             Files to ignore when generating asar package\n                                 (default: *.node)\n  --unpack-dir \u003cpattern\u003e         Dirs to ignore when generating asar package\n  --no-minify                    Do not minify the JavaScript source code\n  --extra-info-plist             The extra string to insert into the Info.plist\n  --identity \u003cidentity\u003e          The identity used for signing app bundle on macOS\n  --entitlements \u003centitlements\u003e  Path to the entitlements file when signing app\n                                 bundle on macOS\n\nCommands:\n\n  init                     Create an empty project under current directory\n  build \u003coutputDir\u003e        Build app bundle\n  dist \u003coutputDir\u003e         Build app bundle and generate app distribution\n  dirty-build \u003coutputDir\u003e  Build app bundle without reinstalling modules\n```\n\nNote that before using Yackage, the target app must have `fetch-yode` listed\nas a dependency.\n\n## Configuration\n\nConfigure your project by adding following fields to `package.json`:\n\n```json\n{\n  \"main\": \"app.js\",\n  \"build\": {\n    \"appId\": \"com.app.id\"\n    \"productName\": \"App\"\n    \"copyright\": \"Copyright © 2020 Company\",\n    \"minify\": true,\n    \"unpack\": \"+(*.node|*.png)\",\n    \"unpackDir\": \"{assets,build}\",\n    \"ignore\": [ \"assets/*\" ],\n    \"icons\": {\n      \"win\": \"assets/icon.ico\",\n      \"mac\": \"assets/icon.icns\"\n    },\n    \"extraInfoPlist\": \"\u003ckey\u003eLSUIElement\u003c/key\u003e\u003ctrue/\u003e\"\n  }\n}\n```\n\n## Examples\n\nGenerate executable from the app under current working directory:\n\n```sh\ncd /path/to/app/\nyackage build out\n```\n\nGenerate executable from path under arbitrary path:\n\n```\nyackage build out --app-dir /path/to/app\n```\n\nGenerate executable for arbitrary platform:\n\n```\nyackage build out --platform win32 --arch ia32\n```\n\nGenerate distributions:\n\n```\nyackage dist out --app-dir /path/to/app\n```\n\n## How yackage works\n\n1. Run `npm pack` to generate tarball for the app.\n2. Extract the tarball to temporary directory and run `npm install`.\n3. Use `asar` to pacakge the app and its dependencies.\n4. Append the generated ASAR archive to Yode.\n5. Yode would automatically recognize the ASAR archive appended in the\n   executable and start with it.\n\n### Differences from packaging in Electron\n\nBy default yackage would unpack the `.node` files so they are not extracted\ndynamically when running, otherwise anti-virus softwares would complain.\n\nThe unpacked files are placed in the `res` directory instead of the usual\n`.unpacked` directory, so the final distribution would look more formal.\n\nThe `.js` files are compressed with `uglify-js` by default.\n\nThe virutal root directory of ASAR archive is `${process.execPath}/asar`. Using\n`process.execPath` as virutal root directory directly would confuse Node.js\nsince it should be a file.\n\n## License\n\nPublic domain.\n\n[yue]: https://github.com/yue/yue\n[yode]: https://github.com/yue/yode\n[electron-builder]: https://www.electron.build/configuration/configuration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyue%2Fyackage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyue%2Fyackage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyue%2Fyackage/lists"}