{"id":18523708,"url":"https://github.com/sonicdoe/grunt-node-gyp","last_synced_at":"2025-04-09T11:31:44.544Z","repository":{"id":10253223,"uuid":"12361303","full_name":"sonicdoe/grunt-node-gyp","owner":"sonicdoe","description":"Run node-gyp commands from Grunt","archived":false,"fork":false,"pushed_at":"2022-05-26T07:39:04.000Z","size":302,"stargazers_count":5,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-24T05:13:37.190Z","etag":null,"topics":["grunt","gruntplugin","node-gyp","nodejs"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"torvalds/linux","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonicdoe.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":"2013-08-25T15:49:05.000Z","updated_at":"2023-03-04T05:46:19.000Z","dependencies_parsed_at":"2022-09-08T07:51:14.944Z","dependency_job_id":null,"html_url":"https://github.com/sonicdoe/grunt-node-gyp","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fgrunt-node-gyp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fgrunt-node-gyp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fgrunt-node-gyp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonicdoe%2Fgrunt-node-gyp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonicdoe","download_url":"https://codeload.github.com/sonicdoe/grunt-node-gyp/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031548,"owners_count":21036426,"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":["grunt","gruntplugin","node-gyp","nodejs"],"created_at":"2024-11-06T17:37:14.388Z","updated_at":"2025-04-09T11:31:44.016Z","avatar_url":"https://github.com/sonicdoe.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-node-gyp [![CI](https://github.com/sonicdoe/grunt-node-gyp/workflows/CI/badge.svg)](https://github.com/sonicdoe/grunt-node-gyp/actions?query=workflow%3ACI)\n\n\u003e Run `node-gyp` commands from Grunt\n\n## Getting started\n\nIf you haven’t used [Grunt](https://gruntjs.com) before, be sure to check out the [Getting started](https://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](https://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you’re familiar with that process, you may install this plugin with this command:\n\n```console\n$ npm install grunt-node-gyp --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-node-gyp')\n```\n\nYou’ll also need to install all necessary build tools. Take a look at [`node-gyp`’s readme](https://github.com/nodejs/node-gyp#installation) for installation instructions. You don’t need to install `node-gyp` globally, however, as it already comes with `grunt-node-gyp`.\n\n## The “gyp” task\n\n### Overview\n\nIn your project’s Gruntfile, add a section named `gyp` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  gyp: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    }\n  }\n})\n```\n\n### Options\n\n#### command\n\nType: `String`\nDefault value: `rebuild`\n\n`node-gyp` command to execute.\n\nSupported commands are `configure`, `build`, `clean` and `rebuild`. See [node-gyp’s readme](https://github.com/nodejs/node-gyp#commands) for command descriptions.\n\n#### options.debug\n\nType: `Boolean`\nDefault value: `false`\n\nCreate a debug build.\n\n#### options.arch\n\nType: `String`\nDefault value: Your processor’s architecture\n\nSet the target architecture: `ia32`, `x64` or `arm`.\n\n### Usage examples\n\n#### Default options\n\nThis would be equivalent to `node-gyp rebuild`.\n\n```console\n$ grunt gyp:addon\n```\n\n```js\ngrunt.initConfig({\n  gyp: {\n    addon: {}\n  }\n})\n```\n\n#### Configure a debug build\n\nThis would be equivalent to `node-gyp configure --debug`.\n\n```console\n$ grunt gyp:customTarget\n```\n\n```js\ngrunt.initConfig({\n  gyp: {\n    customTarget: {\n      command: 'configure',\n      options: {\n        debug: true\n      }\n    }\n  }\n})\n```\n\n#### Build an ARM build\n\nThis would be equivalent to `node-gyp build --arch=arm`.\n\n```console\n$ grunt gyp:arm\n```\n\n```js\ngrunt.initConfig({\n  gyp: {\n    arm: {\n      command: 'build',\n      options: {\n        arch: 'arm'\n      }\n    }\n  }\n})\n```\n\n## Running tests\n\n```console\n$ npm install\n$ npm test\n```\n\nThe test suite might take a while as compiling takes time. You may need to install the Node.js header files beforehand:\n\n```console\n$ npx node-gyp install\n```\n\n## Changelog\n\nThis project follows [Semantic Versioning 2](https://semver.org).\n\n- v5.0.0 (2020-11-15):\n  - Update `node-gyp` to v7\n  - Add support for `node-gyp` v4 and later\n  - Drop support for `node-gyp` versions older than v3\n  - Drop support for Grunt v0.4\n  - Drop support for Node.js versions older than v10\n- v4.0.0 (2017-07-03):\n  - Fix SDK being downloaded to the local directory when using `node-gyp` v3.5 or later\n  - Drop support for Node.js versions older than v4\n- v3.1.0 (2016-06-19): Add support for Grunt v1\n- v3.0.0 (2015-09-08): Update `node-gyp` to v3\n- v2.0.0 (2015-05-25): Update `node-gyp` to v2\n- v1.0.0 (2015-02-14): Improve clarity of error messages by passing `node-gyp`’s error on\n- v0.5.0 (2014-12-02): Add [`arch` option](https://github.com/sonicdoe/grunt-node-gyp#optionsarch)\n- v0.4.1 (2014-08-25): Fix rebuild not stopping execution if one of the commands has failed\n- v0.4.0 (2014-07-01): Update `node-gyp` to v1\n- v0.3.0 (2014-03-05): Update `node-gyp` to v0.13\n- v0.2.1 (2014-02-21): Fix borked v0.2.0 release\n- v0.2.0 (2013-11-21): Update `node-gyp` to v0.12\n- v0.1.0 (2013-08-25): Initial release\n\n## License\n\n`grunt-node-gyp` is licensed under the BSD 2-Clause license. See [`LICENSE`](./LICENSE) for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicdoe%2Fgrunt-node-gyp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonicdoe%2Fgrunt-node-gyp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonicdoe%2Fgrunt-node-gyp/lists"}