{"id":23081132,"url":"https://github.com/unfold/grunt-git-revision","last_synced_at":"2025-08-15T23:31:15.112Z","repository":{"id":11220652,"uuid":"13610288","full_name":"unfold/grunt-git-revision","owner":"unfold","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-31T09:20:56.000Z","size":8,"stargazers_count":5,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-02T01:12:02.898Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unfold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-16T05:16:04.000Z","updated_at":"2017-01-23T12:19:46.000Z","dependencies_parsed_at":"2022-07-21T12:48:04.902Z","dependency_job_id":null,"html_url":"https://github.com/unfold/grunt-git-revision","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/unfold%2Fgrunt-git-revision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fgrunt-git-revision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fgrunt-git-revision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfold%2Fgrunt-git-revision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfold","download_url":"https://codeload.github.com/unfold/grunt-git-revision/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229970545,"owners_count":18152685,"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-12-16T13:47:21.545Z","updated_at":"2024-12-16T13:47:22.430Z","avatar_url":"https://github.com/unfold.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-git-revision\n\n\u003e Get current Git revision\n\n## Getting Started\nThis plugin requires Grunt `~0.4.1`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://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```shell\nnpm install grunt-git-revision --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-git-revision');\n```\n\n## The \"revision\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `revision` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  revision: {\n    options: {\n      property: 'meta.revision',\n      ref: 'HEAD',\n      short: true\n    }\n  },\n})\n```\n\n### Options\n\n#### options.property\nType: `String`\nDefault value: `'meta.revision'`\n\nWhat configuration property to write the revision to.\n\n#### options.ref\nType: `String`\nDefault value: `'HEAD'`\n\nWhat ref to read the revision from.\n\n#### options.short\nType: `Boolean`\nDefault value: `true`\n\nFetch short revision (e.g 5b8348d) or the full revision (5b8348de6b492ca79e732b1902c489332c8d64fb)\n\n### Usage Examples\n\n```js\ngrunt.initConfig({\n  preprocess: {\n    options: {\n      context: {\n        revision: '\u003c%= meta.revision %\u003e'\n      }\n    }\n  }\n})\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n_(Nothing yet)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfold%2Fgrunt-git-revision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfold%2Fgrunt-git-revision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfold%2Fgrunt-git-revision/lists"}