{"id":26878135,"url":"https://github.com/idelsink/vue-cli-plugin-git-describe","last_synced_at":"2025-06-19T19:36:05.206Z","repository":{"id":34856537,"uuid":"184659000","full_name":"idelsink/vue-cli-plugin-git-describe","owner":"idelsink","description":"Vue CLI git-describe plugin","archived":false,"fork":false,"pushed_at":"2023-01-07T05:11:52.000Z","size":3700,"stargazers_count":5,"open_issues_count":28,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T17:26:27.137Z","etag":null,"topics":["describe","git","git-describe","semver","version","vue","vue-cli","vue-cli-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/vue-cli-plugin-git-describe","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/idelsink.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":"2019-05-02T22:13:16.000Z","updated_at":"2021-10-14T15:16:02.000Z","dependencies_parsed_at":"2023-01-15T09:36:27.667Z","dependency_job_id":null,"html_url":"https://github.com/idelsink/vue-cli-plugin-git-describe","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/idelsink/vue-cli-plugin-git-describe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fvue-cli-plugin-git-describe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fvue-cli-plugin-git-describe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fvue-cli-plugin-git-describe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fvue-cli-plugin-git-describe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idelsink","download_url":"https://codeload.github.com/idelsink/vue-cli-plugin-git-describe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fvue-cli-plugin-git-describe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260816722,"owners_count":23067360,"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":["describe","git","git-describe","semver","version","vue","vue-cli","vue-cli-plugin"],"created_at":"2025-03-31T12:19:35.970Z","updated_at":"2025-06-19T19:36:00.190Z","avatar_url":"https://github.com/idelsink.png","language":"JavaScript","readme":"# Vue CLI plugin git-describe\n\n[![npm version](https://img.shields.io/npm/v/vue-cli-plugin-git-describe.svg)](https://www.npmjs.com/package/vue-cli-plugin-git-describe)\n[![npm license](https://img.shields.io/npm/l/vue-cli-plugin-git-describe.svg)](https://www.npmjs.com/package/vue-cli-plugin-git-describe)\n[![Build Status](https://travis-ci.org/idelsink/vue-cli-plugin-git-describe.svg?branch=master)](https://travis-ci.org/idelsink/vue-cli-plugin-git-describe)\n\nThis [Vue CLI](https://cli.vuejs.org/) plugin calls\n[git-describe](https://www.npmjs.com/package/git-describe) with the provided arguments on the working directory or any other directory and\nparses the output to individual components. On compilation time the\ngit-describe information will be injected so that it can be used in, for example,\nbrowser served applications which have no access to the local file system.\n\n## Installation\n\nAvailable from npm:\n\n```shell\n$ vue add git-describe\n```\n\nThis will ask a few questions and will install the plugin.\n\nTests are not included in the npm package —\nclone the git repository to run tests.\n\n## Usage\n\ngit-describe uses the node [git-describe](https://www.npmjs.com/package/git-describe) module.\nDuring compilation, the variable `variableName`, default `GIT_DESCRIBE`, is replaced with the\n[git-describe](https://www.npmjs.com/package/git-describe#example-output) object.\n\n### Example\n\n1. Create an example app (Skip this step if you want to use your own application)\n   ```shell\n   $ vue create test-app \u0026\u0026 cd test-app\n   ```\n   ![Example](assets/example_create_app.png)\n2. Install the git-describe plugin\n   ```shell\n   $ vue add git-describe\n   ```\n   ![Example](assets/example_install.png)\n3. Add the configured constant, default `GIT_DESCRIBE`, to your code.\n  ```JavaScript\n  console.log('App version', GIT_DESCRIBE.raw);\n  ```\n  Outputs:\n  ```text\n  App version c6bd20d-dirty\n  ```\n\n## Options\n\n`git-describe` has the following options available in the `vue.config.js` file:\n\n```JavaScript\nmodule.exports = {\n  pluginOptions: {\n    gitDescribe: {\n      variableName: 'GIT_DESCRIBE'  // The compile-time global constant varialbe name to use in the code.\n    }\n  }\n}\n```\n\n## Example output\n\n```javascript\n{\n    dirty: false,\n    hash: 'g3c9c15b',\n    distance: 6,\n    tag: 'v2.1.0-beta',\n    semver: SemVer, // SemVer instance, see https://github.com/npm/node-semver\n    suffix: '6-g3c9c15b',\n    raw: 'v2.1.0-beta-6-g3c9c15b',\n    semverString: '2.1.0-beta+6.g3c9c15b'\n}\n```\n\n## More information\n\nSee [git-describe](https://www.npmjs.com/package/git-describe) for more information about the usage of the git-describe package and the reason to include the optional [semver](https://github.com/npm/node-semver) package.\n\n## Tests\n\nTests can be run by cloning the repository and running the following command.\n\n```sh\n$ npm install\n$ npm test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidelsink%2Fvue-cli-plugin-git-describe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidelsink%2Fvue-cli-plugin-git-describe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidelsink%2Fvue-cli-plugin-git-describe/lists"}