{"id":20148363,"url":"https://github.com/nwutils/nw-utils-builder","last_synced_at":"2025-04-09T19:51:58.724Z","repository":{"id":40730538,"uuid":"224762873","full_name":"nwutils/nw-utils-builder","owner":"nwutils","description":"WIP: Do not use | Experimental NW.js build tool","archived":false,"fork":false,"pushed_at":"2023-03-04T05:18:39.000Z","size":1149,"stargazers_count":4,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T21:45:59.784Z","etag":null,"topics":["automated-builds","desktop","nw-js","nwjs","tooling","xpda"],"latest_commit_sha":null,"homepage":"https://nwutils.io","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/nwutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-29T02:34:19.000Z","updated_at":"2023-01-10T19:25:22.000Z","dependencies_parsed_at":"2023-02-03T05:02:18.458Z","dependency_job_id":null,"html_url":"https://github.com/nwutils/nw-utils-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-utils-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-utils-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-utils-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-utils-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwutils","download_url":"https://codeload.github.com/nwutils/nw-utils-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103902,"owners_count":21048244,"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":["automated-builds","desktop","nw-js","nwjs","tooling","xpda"],"created_at":"2024-11-13T22:37:22.147Z","updated_at":"2025-04-09T19:51:58.700Z","avatar_url":"https://github.com/nwutils.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# WIP: Do not use\n\nThis was in planning prior to the [nw-builder](https://github.com/nwutils/nw-builder) revitalization project. After that project is in a more finished state, we may use it as a dependency in this project to simplify both repos. `nw-builder` would be focused on doing a single build. `nw-utils-builder` would be focused on doing multiple builds, as tasks (see API ideas below).\n\nFor now, this project is on hold.\n\n\n## nw-utils-builder\n\n[![Build Status](https://travis-ci.org/nwutils/nw-utils-builder.svg?branch=master)](https://travis-ci.org/nwutils/nw-utils-builder) [![Test Coverage](https://img.shields.io/coveralls/github/nwutils/nw-utils-builder?label=Test%20Coverage\u0026logo=jest)](https://coveralls.io/github/nwutils/nw-utils-builder) ![Lint Coverage: 100%](https://img.shields.io/badge/Lint%20Coverage-100%25-brightgreen.svg?logo=eslint)\n\n\u003c!--\n![Node Support \u003e=4.0.0](https://img.shields.io/badge/Node-%3E%3D4.0.0-brightgreen.svg?logo=node.js)\n--\u003e\n\n\n### Experimental NW.js build tool\n\n\n**TODO:**\n\n* [x] Design API\n* [x] Validate options\n* [x] Write unit tests\n* [ ] Produce basic Windows build\n* [ ] Produce basic Linux/OSX build\n* [ ] Implement API features\n   * [x] verbose\n   * [x] files\n   * [x] excludes\n   * [x] outputPattern\n   * [x] strippedManifestProperties\n   * [x] output\n   * [ ] mirror\n   * [ ] nwVersion\n   * [ ] nwFlavor\n   * [ ] platform\n   * [ ] arch\n   * [ ] outputType\n   * [ ] icon\n   * [ ] unIcon\n   * [ ] hostNodeMustMatch\n   * [ ] junk\n   * [ ] concurrent\n* [ ] Support each build type\n   * [ ] zip\n   * [ ] 7z\n   * [ ] nsis\n   * [ ] nsis7z\n* [ ] Find minimum supported Node version for this repo\n* [ ] Documentation\n* [ ] Bump to v1.0.0 and release\n\n\n## Documentation (WIP, do not use)\n\n**Every setting is optional**, but you do need to pass in at least an object as a task.\n\n**Bare minimum:**\n\n```js\nconst nwBuilder = require('nw-utils-builder');\n\nnwBuilder.build({\n  tasks: [{}]\n});\n```\n\n**Basic example:**\n\n```js\nconst nwBuilder = require('nw-utils-builder');\n\nnwBuilder.build({\n  // General options\n  options: {\n    output: './builds' // defaults to './dist'\n  },\n  // Your custom global defaults that all tasks inherit from\n  taskDefaults: {\n    nwVersion: 'v0.44.4', // defaults to 'match'\n    excludes: ['node_modules', 'documentation', 'tests'],\n    outputType: '7z'\n  },\n  tasks: [\n    {}, // an empty object will inherit all the defaults and do a build of that\n    {\n      platform: 'lin',\n      arch: 'x64'\n    },\n    {\n      platform: 'osx',\n      arch: 'x64'\n    }\n  ]\n});\n```\n\n\n### Top-level Settings\n\nName           | Allowed values   | Default     | Description\n:--            | :--              | :--         | :--\n`options`      | Object           | `undefined` | Global options, like your dist folder, or whether to log errors during builds.\n`taskDefaults` | Object           | `undefined` | Settings that all tasks will inherit by default.\n`tasks`        | Array of Objects | `undefined` | Each object represents a unique build task. Any settings here will override the ones set in the `taskDefaults`.\n\n\n### Options\n\nName         | Allowed values | Default                 | Description\n:--          | :--            | :--                     | :--\n`verbose`    | Boolean        | `true`                  | True = Will console log helpful information, warnings, errors, and tips. False = silent, unless something explodes.\n`output`     | File Path      | `'./dist'`              | The location where all builds will be stored\n`mirror`     | URL            | `'https://dl.nwjs.io/'` | NOT IMPLEMENTED. IGNORE\n`concurrent` | Boolean        | `false`                 | NOT IMPLEMENTED. IGNORE\n\n\n### Task Defaults\n\nName                         | Allowed values                                                  | Default                                        | Description\n:--                          | :--                                                             | :--                                            | :--\n`nwVersion`                  | Valid NW.js version, `'latest'`, `'lts'`, `'match'`, `'stable'` | `'match'`                                      | Valid version, like `'0.43.2'`. Latest/LTS/Stable are based on [this](https://nwjs.io/versions.json). Match will use the same version as what is in your `package.json`'s `devDependencies.nw`.\n`nwFlavor`                   | `'match'`, `'normal'`, `'sdk'`                                  | `'normal'`                                     | Which flavor of NW.js to use. Match will use the flavor set in your `package.json`'s `devDependencies.nw`.\n`platform`                   | `'win'`, `'lin'`, `'osx'`                                       | `'win'`                                        | Which OS your build task is for. Windows, Linux, or OSX (MacOS/Darwin).\n`arch`                       | `'x86'`, `'x64'`                                                | `'x86'`                                        | The OS architechture this build task is targeting. x86 = 32-Bit, x64 = 64-Bit OS.\n`files`                      | An array of strings with glob patterns                          | `['**/*']`                                     | This is used to find the files to be copied to your dist folder for that build task.\n`excludes`                   | An array of strings with glob patterns                          | `['node_modules']`                             | This is used to find the files to be skipped when copying `files` to your dist folder.\n`outputType`                 | `'7z'`, `'nsis'`, `'nsis7z'`, `'zip'`                           | `'zip'`                                        | NOT IMPLEMENTED. May change. To be detailed later.\n`outputPattern`              | String                                                          | `'{{name}}-{{version}}-{{platform}}-{{arch}}'` | String used to dynamically name your build task's dist folder. Keywords in double curly braces are replaced at build time. Valid keywords: name, version, nwVersion, nwFlavor, platform, arch, outputType. Name and version are derived from your `package.json`, the rest come from your task's settings.\n`manifestOverrides`          | Object                                                          | `{}`                                           | This object will be deep-merged with your manifest (`package.json`), overriding just the parts you specify.\n`strippedManifestProperties` | Array of strings                                                | `[]`                                           | List of items in the `package.json` manifest to be removed when copied during the build. Can be nested like `['dependencies.lodash']`.\n`junk`                       | Array of strings                                                | `[]`                                           | NOT IMPLEMENTED. May change. Will allow removing of junk files after copying and doing an `npm install`.\n`icon`                       | File path                                                       | `undefined`                                    | NOT IMPLEMENTED. May change.\n`unIcon`                     | File path                                                       | `undefined`                                    | NOT IMPLEMENTED. May change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-utils-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwutils%2Fnw-utils-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-utils-builder/lists"}