All Projects → sethwebster → ember-cli-new-version

sethwebster / ember-cli-new-version

Licence: MIT license
A convention based update notification for Ember. With this addon, you can detect a new version and notify the user to refresh the page

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
Handlebars
879 projects

Projects that are alternatives of or similar to ember-cli-new-version

Ember Cli Notifications
⚛ Atom inspired notification messages for ember-cli
Stars: ✭ 168 (+663.64%)
Mutual labels:  notifications, ember-cli, ember
ember-cli-string-helpers
Set of the String helpers extracted from DockYard's ember-composable-helpers.
Stars: ✭ 73 (+231.82%)
Mutual labels:  ember-cli, ember
ember-cli-qunit
QUnit testing package for ember-cli applications
Stars: ✭ 29 (+31.82%)
Mutual labels:  ember-cli, ember
ember-cli-blog
Tom Dale's blog example updated for the Ember CLI
Stars: ✭ 87 (+295.45%)
Mutual labels:  ember-cli, ember
Intellij Emberjs
Ember.js support for JetBrains IDEs (IntelliJ, WebStorm, ...)
Stars: ✭ 202 (+818.18%)
Mutual labels:  ember-cli, ember
ember-template-inspector
An ember add-on which opens the template file in the code editor while inspecting an element.
Stars: ✭ 15 (-31.82%)
Mutual labels:  ember-cli, ember
ember-app-shell
No description or website provided.
Stars: ✭ 23 (+4.55%)
Mutual labels:  ember-cli, ember
Ember Cli Pace
Pace.js load progress bar for Ember apps, incl. Flash-like initial script lazy loading
Stars: ✭ 128 (+481.82%)
Mutual labels:  ember-cli, ember
ember-content-loader
Easy, customizable content placeholders / skeletons screens
Stars: ✭ 41 (+86.36%)
Mutual labels:  ember-cli, ember
ember-popper
Popper.js for Ember
Stars: ✭ 38 (+72.73%)
Mutual labels:  ember-cli, ember
ember-link-action
Fire an action when LinkTo component transition happens
Stars: ✭ 86 (+290.91%)
Mutual labels:  ember-cli, ember
Ember Cli Mocha
Mocha and Chai tests for ember-cli applications
Stars: ✭ 147 (+568.18%)
Mutual labels:  ember-cli, ember
cli-guides
Step-by-step guides and tutorials for using the ember-cli to create apps and addons
Stars: ✭ 22 (+0%)
Mutual labels:  ember-cli, ember
ember-cli-nouislider
{{range-slider}} component for ember-cli powered by noUiSlider
Stars: ✭ 43 (+95.45%)
Mutual labels:  ember-cli, ember
Ember Web App
NOTICE: official repository moved to https://github.com/zonkyio/ember-web-app
Stars: ✭ 143 (+550%)
Mutual labels:  ember-cli, ember
ember-cli-geo
Geolocation service for Ember.js web apps
Stars: ✭ 48 (+118.18%)
Mutual labels:  ember-cli, ember
Ember Cli Eslint
Ember CLI addon for linting Ember projects with ESLint
Stars: ✭ 116 (+427.27%)
Mutual labels:  ember-cli, ember
Ember Tether
Tether an element to another element in the DOM
Stars: ✭ 116 (+427.27%)
Mutual labels:  ember-cli, ember
labs-factfinder
New York City Census Reporting Tool
Stars: ✭ 34 (+54.55%)
Mutual labels:  ember-cli, ember
ember-cli-ifa
Ember CLI addon for injecting fingerprinted asset map file into Ember app
Stars: ✭ 54 (+145.45%)
Mutual labels:  ember-cli, ember

ember-cli-new-version

Build Status

A convention-based version update notifier. Use it to notify users already on the page that a new version has been deployed.

Compatibility

  • Ember.js v3.20 or above
  • Ember CLI v3.20 or above
  • Node.js v12 or above

Usage

  1. Add this add-on as you would any other:
> ember install ember-cli-new-version
  1. Add a version file to your app, eg: ./public/VERSION.txt
1.0.0
  1. Include the component in your view:
<NewVersionNotifier/>

voila!

Configuration

To setup, you should first configure the service through config/environment:

module.exports = function (environment) {
  var ENV = {
    newVersion: {
      currentVersion: null,
      versionFileName: 'VERSION.txt',
      updateInterval: 60000,
      firstCheckInterval: 0,
      enableInTests: false,
      enableInDev: false,
      maxCountInTesting: 10,    
    },
  };
};

  • currentVersion - The current version of the app if not using [Automatic VERSION file creation][#Automatic VERSION file creation] default: null
  • versionFileName - the name of the file on the server to check default: /VERSION.txt
  • updateInterval - the amount of time, in milliseconds, to wait between version checks default: 60000
  • firstCheckInterval - the amount of time, in milliseconds, to wait before the first version check is run after booting the application default: 0
  • enableInTests - Should the version checking run in test environments? default: false
  • enableInDev - Should the version checking run in the dev environments? default: false
  • maxCountInTesting - How many times to check for a new version in tests. default: 10

Automatic Version File Creation

If no VERSION.txt file exists it will be automatically generated during the build process with the value of currentVersion or the version from package.json.

Supports ember-cli-app-version

Since version 4.0.0 this addons will use the version string provided by ember-cli-app-version if no currentVersion is configured.

All you have to do is install ember-cli-app-version.

Then an update is triggered based on full version strings with build metadata such as 1.0.0-beta-2-e1dffe1.

Notifier Configuration and Interface


  • updateMessage - the message to show to users when update has been detected. There are two tokens allowed in this string: {newVersion} and {oldVersion} which will replaced with their respective values. eg. (and default). "This application has been updated from version {oldVersion} to {newVersion}. Please save any work, then refresh browser to see changes."
  • showReload - true shows a reload button the user can click to refresh. false hides the button. default: true
  • reloadButtonText - Sets the text for the default reload button. default: "Reload"
<NewVersionNotifier
  @updateMessage="A new version was released: {newVersion}"
  @showReload={{true}}
/>

Custom Notification

By default the notification is styled as a Bootstrap Alert. If you want custom layouts or to use a different framework, then you can define your own markup for the notification.

<NewVersionNotifier as |version lastVersion reload close|>
  <div class="custom-notification">
    Reload to update to the new version ({{version}}) of this application
    <button type="button" {{on "click" reload}}>Reload</button>
    <button type="button" {{on "click" close}}>Close</button>
  </div>
</NewVersionNotifier>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].