{"id":26066496,"url":"https://github.com/janeasystems/nodejs-mobile-gyp","last_synced_at":"2025-04-11T16:26:17.989Z","repository":{"id":45892868,"uuid":"140328367","full_name":"JaneaSystems/nodejs-mobile-gyp","owner":"JaneaSystems","description":"Fork of https://github.com/nodejs/node-gyp","archived":false,"fork":false,"pushed_at":"2024-01-23T12:24:29.000Z","size":5144,"stargazers_count":8,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"mobile-master","last_synced_at":"2025-02-13T02:52:37.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/JaneaSystems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-09T18:44:59.000Z","updated_at":"2021-10-27T09:46:41.000Z","dependencies_parsed_at":"2024-06-18T18:41:43.909Z","dependency_job_id":"8445a6b3-a111-48cc-b066-9ec65b84cbbe","html_url":"https://github.com/JaneaSystems/nodejs-mobile-gyp","commit_stats":{"total_commits":832,"total_committers":124,"mean_commits":6.709677419354839,"dds":0.3004807692307693,"last_synced_commit":"8678a63bc6b88d2363fa48965c20d351ed481a90"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneaSystems%2Fnodejs-mobile-gyp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneaSystems%2Fnodejs-mobile-gyp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneaSystems%2Fnodejs-mobile-gyp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaneaSystems%2Fnodejs-mobile-gyp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaneaSystems","download_url":"https://codeload.github.com/JaneaSystems/nodejs-mobile-gyp/tar.gz/refs/heads/mobile-master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242608447,"owners_count":20157360,"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":"2025-03-08T20:52:22.553Z","updated_at":"2025-03-08T20:52:23.095Z","avatar_url":"https://github.com/JaneaSystems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Project Status: Unsupported – The project has reached a stable, usable state but the author(s) have ceased all work on it.](https://www.repostatus.org/badges/latest/unsupported.svg)](https://www.repostatus.org/#unsupported)\n\n:warning: The project is no longer being actively maintained by Janea Systems.  \nForks of the repos have been created on a dedicated Github org to allow community-driven development to continue:  \nhttps://github.com/nodejs-mobile\n\nnodejs-mobile-gyp\n=======\n\n## Node.js for Mobile Apps native addon build tool\n\nThis is a fork of [node-gyp](https://github.com/nodejs/node-gyp) with changes to achieve\ngreater compatibility for building native modules for [nodejs-mobile](https://github.com/janeasystems/nodejs-mobile).\n\n***Disclaimer:***  documentation found in this repository is currently unchanged from the parent repository and may only be applicable to `node-gyp`.\n\nThe rest of this `README` is from the original `node-gyp` project's `README`.\n\n## Node.js native addon build tool\n=======\n# `node-gyp` - Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js. It bundles the [gyp](https://gyp.gsrc.io)\nproject used by the Chromium team and takes away the pain of dealing with the\nvarious differences in build platforms.\n\nMultiple target versions of Node.js are supported (i.e. `0.8`, ..., `4`, `5`, `6`,\netc.), regardless of what version of Node.js is actually installed on your system\n(`node-gyp` downloads the necessary development files or headers for the target version).\n\n## Features\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node.js\n\n## Installation\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n### On Unix\n\n   * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)\n   * `make`\n   * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)\n\n### On macOS\n\n   * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported) (already installed on macOS)\n   * [Xcode](https://developer.apple.com/xcode/download/)\n     * You also need to install the `Command Line Tools` via Xcode. You can find this under the menu `Xcode -\u003e Preferences -\u003e Locations` (or by running `xcode-select --install` in your Terminal)\n       * This step will install `gcc` and the related toolchain containing `make`\n\n### On Windows\n\n#### Option 1\n\nInstall all the required tools and configurations using Microsoft's [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) using `npm install --global --production windows-build-tools` from an elevated PowerShell or CMD.exe (run as Administrator).\n\n#### Option 2\n\nInstall tools and configuration manually:\n   * Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)\n   (using \"Visual C++ build tools\" workload) or [Visual Studio 2017 Community](https://visualstudio.microsoft.com/pl/thank-you-downloading-visual-studio/?sku=Community)\n   (using the \"Desktop development with C++\" workload)\n   * Install [Python 2.7](https://www.python.org/downloads/) (`v3.x.x` is not supported), and run `npm config set python python2.7` (or see below for further instructions on specifying the proper Python version and path.)\n   * Launch cmd, `npm config set msvs_version 2017`\n\n   If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.\n\nIf you have multiple Python versions installed, you can identify which Python\nversion `node-gyp` uses by setting the '--python' variable:\n\n``` bash\n$ node-gyp --python /path/to/python2.7\n```\n\nIf `node-gyp` is called by way of `npm`, *and* you have multiple versions of\nPython installed, then you can set `npm`'s 'python' config key to the appropriate\nvalue:\n\n``` bash\n$ npm config set python /path/to/executable/python2.7\n```\n\n## How to Use\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\nAuto-detection fails for Visual C++ Build Tools 2015, so `--msvs_version=2015`\nneeds to be added (not needed when run by npm as configured above):\n``` bash\n$ node-gyp configure --msvs_version=2015\n```\n\n__Note__: The `configure` step looks for a `binding.gyp` file in the current\ndirectory to process. See below for instructions on creating a `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next, invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point,\nyou can require the `.node` file with Node.js and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running either the `configure`, `build` or `rebuild` commands.\n\n## The `binding.gyp` file\n\nA `binding.gyp` file describes the configuration to build your module, in a\nJSON-like format. This file gets placed in the root of your package, alongside\n`package.json`.\n\nA barebones `gyp` file appropriate for building a Node.js addon could look like:\n\n``` python\n{\n  \"targets\": [\n    {\n      \"target_name\": \"binding\",\n      \"sources\": [ \"src/binding.cc\" ]\n    }\n  ]\n}\n```\n\nSome additional resources for addons and writing `gyp` files:\n\n * [\"Going Native\" a nodeschool.io tutorial](http://nodeschool.io/#goingnative)\n * [\"Hello World\" node addon example](https://github.com/nodejs/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md)\n * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/nodejs/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\n## Commands\n\n`node-gyp` responds to the following commands:\n\n| **Command**   | **Description**\n|:--------------|:---------------------------------------------------------------\n| `help`        | Shows the help dialog\n| `build`       | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean`       | Removes the `build` directory if it exists\n| `configure`   | Generates project build files for the current platform\n| `rebuild`     | Runs `clean`, `configure` and `build` all in a row\n| `install`     | Installs Node.js header files for the given version\n| `list`        | Lists the currently installed Node.js header versions\n| `remove`      | Removes the Node.js header files for the given version\n\n\n## Command Options\n\n`node-gyp` accepts the following command options:\n\n| **Command**                       | **Description**\n|:----------------------------------|:------------------------------------------\n| `-j n`, `--jobs n`                | Run `make` in parallel\n| `--target=v6.2.1`                 | Node.js version to build for (default is `process.version`)\n| `--silly`, `--loglevel=silly`     | Log all progress to console\n| `--verbose`, `--loglevel=verbose` | Log most progress to console\n| `--silent`, `--loglevel=silent`   | Don't log anything to console\n| `debug`, `--debug`                | Make Debug build (default is `Release`)\n| `--release`, `--no-debug`         | Make Release build\n| `-C $dir`, `--directory=$dir`     | Run command in different directory\n| `--make=$make`                    | Override `make` command (e.g. `gmake`)\n| `--thin=yes`                      | Enable thin static libraries\n| `--arch=$arch`                    | Set target architecture (e.g. ia32)\n| `--tarball=$path`                 | Get headers from a local tarball\n| `--devdir=$path`                  | SDK download directory (default is `~/.node-gyp`)\n| `--ensure`                        | Don't reinstall headers if already present\n| `--dist-url=$url`                 | Download header tarball from custom URL\n| `--proxy=$url`                    | Set HTTP proxy for downloading header tarball\n| `--cafile=$cafile`                | Override default CA chain (to download tarball)\n| `--nodedir=$path`                 | Set the path to the node source code\n| `--python=$path`                  | Set path to the Python 2 binary\n| `--msvs_version=$version`         | Set Visual Studio version (Windows only)\n| `--solution=$solution`            | Set Visual Studio Solution version (Windows only)\n\n## Configuration\n\n### Environment variables\n\nUse the form `npm_config_OPTION_NAME` for any of the command options listed\nabove (dashes in option names should be replaced by underscores).\n\nFor example, to set `devdir` equal to `/tmp/.gyp`, you would:\n\nRun this on Unix:\n\n```bash\n$ export npm_config_devdir=/tmp/.gyp\n```\n\nOr this on Windows:\n\n```console\n\u003e set npm_config_devdir=c:\\temp\\.gyp\n```\n\n### `npm` configuration\n\nUse the form `OPTION_NAME` for any of the command options listed above.\n\nFor example, to set `devdir` equal to `/tmp/.gyp`, you would run:\n\n```bash\n$ npm config set [--global] devdir /tmp/.gyp\n```\n\n**Note:** Configuration set via `npm` will only be used when `node-gyp`\nis run via `npm`, not when `node-gyp` is run directly.\n\n## License\n\n`node-gyp` is available under the MIT license. See the [LICENSE\nfile](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaneasystems%2Fnodejs-mobile-gyp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaneasystems%2Fnodejs-mobile-gyp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaneasystems%2Fnodejs-mobile-gyp/lists"}