Skip to content

Commit

Permalink
Add setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge authored Jul 18, 2022
1 parent 1ac0a3b commit d26519f
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
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 :)

0 comments on commit d26519f

Please sign in to comment.