0.1.7 • Published 10 months ago
@bagaar/build-helpers v0.1.7
@bagaar/build-helpers
Build helpers for Bagaar apps.
Usage
- 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;
};
- 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,
});
}
}
- Build the app:
pnpm build
- Upload the source maps to Bugsnag:
pnpm upload-source-maps
- Clean the "dist" folder:
pnpm clean-dist-folder
- Finally, upload the "dist" folder to the server.