Ember CLI Deploy Manifest Generator

raw JSON →
3.0.0 verified Thu Apr 23 auth: no javascript

ember-cli-deploy-manifest is an Ember CLI Deploy plugin designed to generate a manifest file during the application's build process. This manifest lists all versioned asset files, enabling deployment plugins like ember-cli-deploy-s3 to perform efficient, differential uploads. By comparing the current manifest with a previously deployed one, the plugin identifies only the changed files, reducing upload times and bandwidth usage significantly. The current stable version is 3.0.0, released in June 2023. This plugin operates within the ember-cli-deploy ecosystem, specifically implementing `configure` and `willUpload` hooks. Its release cadence appears to be tied to major ember-cli-deploy ecosystem updates or breaking changes in underlying dependencies, with major versions typically several years apart. Its primary differentiator is its integral role in optimizing asset deployments for Ember applications using the `ember-cli-deploy` toolchain.

error Error: Node.js v12.x is no longer supported by ember-cli-deploy-manifest. Please upgrade to Node.js v14.x or higher.
cause Running `ember-cli-deploy-manifest` v3.0.0 or later with an unsupported Node.js version.
fix
Upgrade your Node.js environment to a compatible version (14.x, 16.x, 18.x, or >=20.x).
error Error: The 'distDir' property was not found in the deployment context.
cause The `ember-cli-deploy-build` plugin, which populates `distDir` and `distFiles`, either wasn't run or completed unsuccessfully before `ember-cli-deploy-manifest`.
fix
Ensure ember-cli-deploy-build is included in your config/deploy.js pipeline and executes successfully prior to ember-cli-deploy-manifest.
error Manifest file is empty or missing expected assets.
cause Incorrect `filePattern` or `fileIgnorePattern` configuration, or no fingerprinted assets were generated in the `dist` directory.
fix
Verify your filePattern and fileIgnorePattern in config/deploy.js are correct and match your application's built asset names. Check the dist folder to confirm assets are fingerprinted and present.
error Error: Cannot find module 'ember-cli-deploy-manifest'
cause The package has not been installed or has been removed from `node_modules`.
fix
Run ember install ember-cli-deploy-manifest or yarn add --dev ember-cli-deploy-manifest to install the plugin.
breaking Version 3.0.0 introduces breaking changes by updating dependencies and significantly increasing the minimum required Node.js version. Projects using older Node.js versions (e.g., Node 12.x) will fail.
fix Ensure your project's Node.js environment meets the new requirements (Node.js 14.x, 16.x, 18.x, or >=20.x). Update your CI/CD pipelines and local development environments accordingly.
breaking Upgrading to v3.0.0 may require updating other `ember-cli-deploy` plugins to ensure compatibility with the updated dependency tree and potentially new internal APIs.
fix Review the changelogs of all `ember-cli-deploy` plugins used in your project and update them to their latest compatible versions. Test your deployment pipeline thoroughly after upgrading.
gotcha This plugin relies on the `distDir` and `distFiles` properties being present in the deployment context. These are typically provided by `ember-cli-deploy-build`. If `ember-cli-deploy-build` is not used or misconfigured, the manifest generation will fail or be incorrect.
fix Always include `ember-cli-deploy-build` in your `ember-cli-deploy` pipeline before `ember-cli-deploy-manifest`. Verify that `ember-cli-deploy-build` is correctly configured and successfully executing.
gotcha The `filePattern` and `fileIgnorePattern` options control which files are included or excluded from the generated manifest. Incorrect patterns can lead to incomplete manifests or the inclusion of unintended files, affecting caching and deployment efficiency.
fix Carefully review and test your `filePattern` and `fileIgnorePattern` configurations. Use specific glob patterns and ensure they correctly match only the desired fingerprinted assets, often including `json` files since v2.0.0.
gotcha As a Node-only Ember CLI addon, this package does not include many files and dependencies required for Ember CLI's typical `ember build` and `ember test` processes. Attempting to run `ember build` or `ember test` directly within the plugin's own directory will likely fail.
fix This is expected behavior for this type of package. Its functionality is exposed through the `ember-cli-deploy` system. Testing the plugin itself is done via `yarn test` in its repository, not through standard Ember CLI commands.
npm install ember-cli-deploy-manifest
yarn add ember-cli-deploy-manifest
pnpm add ember-cli-deploy-manifest

This quickstart shows how to install the plugin and configure its basic options in `config/deploy.js` to ensure a manifest is generated with desired file patterns during deployment.

yarn add --dev ember-cli-deploy-manifest
ember install ember-cli-deploy-manifest

// config/deploy.js
// Make sure ember-cli-deploy-build runs before this plugin in your deploy.json pipeline.
module.exports = function(deployTarget) {
  const ENV = {
    build: {
      environment: 'production'
    },
    manifest: {
      filePattern: '**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2,json}',
      manifestPath: 'manifest.txt' // Default, but can be customized
    },
    // ... other plugins like s3, redis, etc.
  };

  if (deployTarget === 'production') {
    // Additional production-specific configuration
  }

  return ENV;
};