/ember-cli-deploy-html-manifest

An ember-cli-deploy plugin to generate a html cache manifest and update the manifest attribute of the index.html page.

Primary LanguageJavaScriptMIT LicenseMIT

WARNING: Html manifest is deprecated. This plugin is no longer maintained. Use ember-service-worker

ember-cli-deploy-html-manifest Build Status

An ember-cli-deploy plugin to generate a html cache manifest and update the manifest attribute of the index.html page.

This plugin creates a html cache manifest file and updates the manifest attribute on the html tag of the index.html page. It versions the manifest file using the ember-cli-deploy-revision-data plugin.

Quick Start

To get up and running quickly, do the following:

$ ember install ember-cli-deploy-html-manifest
  • Place the following configuration into config/deploy.js
ENV['html-manifest'] = {
  filename: 'manifest.appcache',
  prependPath: 'https://mycdn.com/',
  excludePaths: ['index.html'],
  includePaths: ['/mobile/'],
  network: ['*']
}
  • Run the pipeline
$ ember deploy

ember-cli-deploy Hooks Implemented

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

  • configure
  • didPrepare

Configuration Options

filename

The name of the manifest file to be created and refrenced in the html tag manifest attribute.

Default: 'manifest.appcache'

manifestRoot

A funtion that returns the root path to the the manifest file. Is refrenced in the html tag manifest attribute.

Default:

  function(context) {
    var revisionKey = context.revisionData && context.revisionData.revisionKey;

    return '/revisions/' + revisionKey;
  }

excludePaths

An array of paths not to be included in the cache manifest.

Default: ['index.html']

includePaths

A list of paths to be added to the cache manifest file.

Default: ['/']

network

A list of paths to be added to the NETWORK section of the cache manifest.

Default: ['*']

Prerequisites

The following properties are expected to be present on the deployment context object:

Running Tests

  • npm test