{"_id":"@capacitor-trancee/sync-version","_rev":"1-fe0b1e7d1eaae50fb7c564ce15a4dd83","name":"@capacitor-trancee/sync-version","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.0":{"name":"@capacitor-trancee/sync-version","version":"1.1.0","license":"MIT","_id":"@capacitor-trancee/sync-version@1.1.0","maintainers":[{"name":"trancee","email":"philipp.grosswiler@gmail.com"}],"homepage":"https://github.com/trancee/capacitor-sync-version#readme","bugs":{"url":"https://github.com/trancee/capacitor-sync-version/issues"},"bin":{"capacitor-sync-version":"dist/index.js"},"dist":{"shasum":"e6bfaa21372ee4d19dbf457877dbf0934d79bb75","tarball":"https://registry.npmjs.org/@capacitor-trancee/sync-version/-/sync-version-1.1.0.tgz","fileCount":12,"integrity":"sha512-pVnu9YA5kTUEY5x4gn2jYG3minbgkds9qU7iMxBoIt43yvZ/9HcfJ4O2UbArwKTQKfCS2YYxX88J/1zKODz9sQ==","signatures":[{"sig":"MEUCIQDVDOnL4ag4o0PoxE+k8LXk6YaT69SQQdRK4qhdTmsr3wIgWf6pwR5l6bgz1xRYkRtFZFmfAqxISlhWWzRofmzJZAM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11871},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2c422d5ab3d6a94108cfbfc21d748533661431fc","scripts":{"build":"tsc","prepare":"npm run build","prebuild":"rimraf dist # rm -rf dist","postbuild":"chmod +x dist/index.js"},"_npmUser":{"name":"trancee","email":"philipp.grosswiler@gmail.com"},"repository":{"url":"git+https://github.com/trancee/capacitor-sync-version.git","type":"git"},"_npmVersion":"10.5.2","description":"Syncing version from package.json to target platform in the capacitor projects.","directories":{},"_nodeVersion":"18.18.0","dependencies":{"chalk":"^4.1.2","plist":"^3.1.0","semver":"^7.6.0","commander":"^8.3.0","await-to-js":"^3.0.0","load-json-file":"^6.2.0","properties-reader":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^3.0.2","ts-node":"^10.9.2","typescript":"^4.9.5","@types/node":"^14.18.63","@types/plist":"^3.0.5","@types/semver":"^7.5.8","@types/properties-reader":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/sync-version_1.1.0_1712941272030_0.548156546667987","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@capacitor-trancee/sync-version","version":"1.1.1","description":"Syncing version from package.json to target platform in the capacitor projects.","bin":{"capacitor-sync-version":"dist/index.js"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prebuild":"rimraf dist # rm -rf dist","build":"tsc","postbuild":"chmod +x dist/index.js","prepare":"npm run build"},"dependencies":{"await-to-js":"^3.0.0","chalk":"^4.1.2","commander":"^8.3.0","load-json-file":"^6.2.0","plist":"^3.1.0","properties-reader":"^2.3.0","semver":"^7.6.0"},"devDependencies":{"@types/node":"^14.18.63","@types/plist":"^3.0.5","@types/properties-reader":"^2.1.3","@types/semver":"^7.5.8","rimraf":"^3.0.2","ts-node":"^10.9.2","typescript":"^4.9.5"},"repository":{"type":"git","url":"git+https://github.com/trancee/capacitor-sync-version.git"},"license":"MIT","_id":"@capacitor-trancee/sync-version@1.1.1","gitHead":"f42406e45d1fa114658a6f8b2aa2117e26439a93","bugs":{"url":"https://github.com/trancee/capacitor-sync-version/issues"},"homepage":"https://github.com/trancee/capacitor-sync-version#readme","_nodeVersion":"18.19.1","_npmVersion":"10.8.1","dist":{"integrity":"sha512-FGXY7mg8GO1o26MRnAw9febFYynFYD5KXsYKXV07A+mTMXn/INy4x8qebnqmsH2cjrkv64bykQPg1nScN/1XVQ==","shasum":"e88282b391ecf593cb743622de85e9efc6922463","tarball":"https://registry.npmjs.org/@capacitor-trancee/sync-version/-/sync-version-1.1.1.tgz","fileCount":12,"unpackedSize":11891,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfpTsd6SyKJQDP6lsRqINMV9EemlwUSqfHN1GJlZNaKAIhAJNivIaSB9AjzinHrK+vBj2xTzotpI4S+88wLWZ87BFh"}]},"_npmUser":{"name":"trancee","email":"philipp.grosswiler@gmail.com"},"directories":{},"maintainers":[{"name":"trancee","email":"philipp.grosswiler@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sync-version_1.1.1_1720520541394_0.5905421989235804"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-12T17:01:11.971Z","modified":"2024-07-09T10:22:21.691Z","1.1.0":"2024-04-12T17:01:12.197Z","1.1.1":"2024-07-09T10:22:21.511Z"},"bugs":{"url":"https://github.com/trancee/capacitor-sync-version/issues"},"license":"MIT","homepage":"https://github.com/trancee/capacitor-sync-version#readme","repository":{"type":"git","url":"git+https://github.com/trancee/capacitor-sync-version.git"},"description":"Syncing version from package.json to target platform in the capacitor projects.","maintainers":[{"name":"trancee","email":"philipp.grosswiler@gmail.com"}],"readme":"# capacitor-sync-version\n\n![npm package version](https://img.shields.io/npm/v/capacitor-sync-version?style=flat-square) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green?style=flat-square)\n\nSyncing version from package.json to target platform in the capacitor projects.\n\nCurrently supported platforms are: `[android, ios]`.\n\n## Installation\n\n```shell\nnpm add --save-dev capacitor-sync-version\n```\n\n## Additional preparation for Android only\n\n**Step 1**. Create a file named `app.properties` in `./android/app/`, then add the following properties:\n\n```\nversionName=0.0.1\nversionCode=1\n```\nThese properties will be updated when capacitor-sync-version running.\n\n**Step 2**. Adjust codes to referrence these properties in `./android/app/build.gradle`.\n\n* Add the following codes after `apply plugin: 'com.android.application'`:\n\n  ```\n  def appProperties = new Properties();\n  file(\"app.properties\").withInputStream { appProperties.load(it) }\n  ```\n\n* Update properties in `defaultConfig {}` block:\n\n  ```\n  defaultConfig {\n    versionCode appProperties.getProperty(\"versionCode\").toInteger()\n    versionName appProperties.getProperty(\"versionName\")\n  }\n  ```\n\n## Usage\n\nThe simplest way to use capacitor-sync-version is running it in the [capacitor hooks](https://capacitorjs.com/docs/cli/hooks).\n\nJust adding the following script to `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"capacitor:copy:before\": \"capacitor-sync-version\"\n  }\n}\n```\n\nIn this way, capacitor-sync-version will be run before capacitor copy command, e.g., `npx cap copy`.\n\nOther ways to run capacitor-sync-version are:\n\n```shell\n# sync for android only\ncapacitor-sync-version android\n\n# sync for both android and ios\ncapacitor-sync-version android ios\n```\n\n## Licence\n\nMIT\n","readmeFilename":"README.md"}