@bagaar/build-helpers

0.1.7 • Public • Published

@bagaar/build-helpers

CI Code Style: Prettier Conventional Commits

Build helpers for Bagaar apps.

Usage

  1. Include the build info in the app:
// config/environment.js

const { getBuildInfo } = require("@bagaar/build-helpers");

module.exports = function () {
  const ENV = {
    buildInfo: getBuildInfo(),
  };

  return ENV;
};
  1. Pass along the build version to Bugsnag:
// app/routes/application.js

import Bugsnag from "@bugsnag/js";
import Route from "@ember/routing/route";
import config from "ember-project-boilerplate/config/environment";

export default class ApplicationRoute extends Route {
  beforeModel() {
    this.setupBugsnag();
  }

  setupBugsnag() {
    Bugsnag.start({
      appVersion: config.buildInfo.versionWithHash,
    });
  }
}
  1. Build the app:
pnpm build
  1. Upload the source maps to Bugsnag:
pnpm upload-source-maps
  1. Clean the "dist" folder:
pnpm clean-dist-folder
  1. Finally, upload the "dist" folder to the server.

Readme

Keywords

none

Package Sidebar

Install

npm i @bagaar/build-helpers

Weekly Downloads

93

Version

0.1.7

License

MIT

Unpacked Size

35.2 kB

Total Files

25

Last publish

Collaborators

  • gvdp