-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ac0a3b
commit d26519f
Showing
1 changed file
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
# sbt-bundlemon | ||
# sbt-bundlemon | ||
|
||
Track Scala.js bundle size in CI with [BundleMon](https://github.com/LironEr/bundlemon). Check out an [example PR](https://github.com/armanbilge/sbt-bundlemon/pull/2#issuecomment-1187659884). | ||
|
||
## Configure | ||
|
||
1. Install the [BundleMon App](https://github.com/apps/bundlemon) on your repository. | ||
|
||
2. In `project/plugins.sbt` add: | ||
```scala | ||
addSbtPlugin("com.armanbilge" % "sbt-bundlemon" % "0.1.0") | ||
``` | ||
|
||
3. Enable the plugin on one or more _applications_ in your `build.sbt` (or anything that [exports to JavaScript](https://www.scala-js.org/doc/interoperability/export-to-javascript.html)): | ||
```scala | ||
lazy val todoMvc = project.in(file("todo-mvc")) | ||
.enablePlugins(BundleMonPlugin) | ||
.settings( | ||
scalaJSUseMainModuleInitializer := true | ||
) | ||
``` | ||
|
||
4. Add the following step to step to your CI workflow: | ||
```yaml | ||
- name: Monitor bundle size | ||
run: sbt bundleMon | ||
``` | ||
5. Now you will get reports about the gzipped, fully-optimized bundle size in CI status and PR comments! | ||
Please open issues and PRs for anything and everything :) |