ember-cli-app-version

Adds App version number to Ember Inspector Info Tab

MIT 31 个版本
安装
npm install ember-cli-app-version
yarn add ember-cli-app-version
pnpm add ember-cli-app-version
bun add ember-cli-app-version
README

ember-cli-app-version

CI NPM Version Ember Observer Score

Adds your Ember App's version to Info tab in Ember Inspector. The version is taken from your project's package.json#version. If you add build metadata to the version, this addon will automatically append SHA to the end of the version.

Compatibility

  • Ember.js v3.28 or above
  • Ember CLI v3.28 or above
  • Node.js v18 or above

Installation

ember install ember-cli-app-version

Usage

Ember Inspector Info Tab

{{app-version}} helper

This addon provides {{app-version}} helper that allows you to show your current app version in your app.

The addon has flags to display parts of the version:

  • {{app-version versionOnly=true}} // => 2.0.1
  • {{app-version versionOnly=true showExtended=true}} // => 2.0.1-alpha.1
  • {{app-version shaOnly=true}} // => <git SHA>

Flags are false by default.

Heroku

When running on Heroku the .git folder is not present, making it impossible to fetch the git SHA. A workaround for this is adding the below in your config/environment.js:

// Heroku Git Hash support
if (process.env.SOURCE_VERSION) {
  const pkg = require('../package.json');
  const hash = process.env.SOURCE_VERSION.substr(0, 7);
  ENV['ember-cli-app-version'] = {
    version: `${pkg.version}+${hash}`,
  };
}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

版本列表
7.0.0 2024-06-10
6.0.1 2023-06-15
6.0.0 2023-02-02
5.0.0 2021-03-08
4.0.0 2020-10-09
3.2.0 2018-04-26
3.1.3 2017-11-30
3.1.2 2017-11-29
3.1.1 2017-11-28
3.1.0 2017-08-16
3.0.0 2017-03-25
2.1.0 2017-08-16
2.0.2 2017-03-11
2.0.1 2016-10-25
2.0.0 2016-08-09
1.0.1 2016-08-06
1.0.0 2015-08-24
0.5.1 2015-08-21
0.5.0 2015-08-05
0.4.0 2015-06-27
0.3.5 2015-07-09
0.3.3 2015-03-10
0.3.2 2015-03-07
0.3.1 2015-01-28
0.3.0 2015-01-26
0.2.3 2015-01-25
0.2.2 2015-01-08
0.2.1 2014-12-04
0.2.0 2014-11-18
0.1.1 2014-11-11
0.1.0 2014-11-04