diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d7720a0..ffed4906 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,10 @@ name: CI on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml index 87520cc9..878199bd 100644 --- a/.github/workflows/ghpages.yml +++ b/.github/workflows/ghpages.yml @@ -4,7 +4,7 @@ name: Build and Deploy GhPages docs on: push: branches: - - master + - main jobs: build-and-deploy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb21e07b..15051d56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: push: - branches: [master] + branches: [main] tags: ["*"] jobs: publish: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45776575..3a86d37b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ $ sbt "sbt-scalajs-bundler/scripted sbt-scalajs-bundler/" ~~~ (where `` is replaced by one of the -[tests](https://github.com/scalacenter/scalajs-bundler/tree/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler)). +[tests](https://github.com/scalacenter/scalajs-bundler/tree/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler)). Sometimes you would like to open an interactive sbt shell and manually play with sbt tasks instead of writing them into a sbt-scripted test. In such a case, you diff --git a/README.md b/README.md index d4744d60..2c5aaf52 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -scalajs-bundler [![](https://index.scala-lang.org/scalacenter/scalajs-bundler/sbt-scalajs-bundler/latest.svg)](https://index.scala-lang.org/scalacenter/scalajs-bundler) [![Gitter](https://img.shields.io/badge/gitter-join%20chat-green.svg)](https://gitter.im/scalacenter/scalajs-bundler) [![Build Status](https://travis-ci.org/scalacenter/scalajs-bundler.svg?branch=master)](https://travis-ci.org/scalacenter/scalajs-bundler) +scalajs-bundler [![](https://index.scala-lang.org/scalacenter/scalajs-bundler/sbt-scalajs-bundler/latest.svg)](https://index.scala-lang.org/scalacenter/scalajs-bundler) [![Gitter](https://img.shields.io/badge/gitter-join%20chat-green.svg)](https://gitter.im/scalacenter/scalajs-bundler) [![Build Status](https://travis-ci.org/scalacenter/scalajs-bundler.svg?branch=main)](https://travis-ci.org/scalacenter/scalajs-bundler) ============== Module bundler for Scala.js projects that use NPM packages. diff --git a/manual/src/ornate/cookbook.md b/manual/src/ornate/cookbook.md index d6f0019a..b14504c1 100644 --- a/manual/src/ornate/cookbook.md +++ b/manual/src/ornate/cookbook.md @@ -51,7 +51,7 @@ More fine-grained control over the list of monitored files is possible by overri `webpackMonitoredFiles` task. You can find a working example of custom configuration file -[here](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/prod.webpack.config.js). +[here](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/prod.webpack.config.js). It is also possible to configure a webpack config file to be used in reload workflow and when running the tests. This configuration may not contain `entry` and `output` configuration but can be used to configure loaders etc. @@ -107,7 +107,7 @@ module.exports = merge(commonConfig, { ~~~ You can find a working example of a project using a shared configuration file -[here](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig). +[here](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/sharedconfig). ## How to use npm modules from Scala code? {#facade} @@ -162,7 +162,7 @@ There are several points worth highlighting: > {.note} > Other styles of facades (importing a member in particular, importing functions and classes, > importing local JavaScript files, etc.) can be found in -> [these tests](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/facade-examples). +> [these tests](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/facade-examples). Finally, in your Scala code, just refer to the `foo` object: @@ -207,7 +207,7 @@ custom webpack configuration file: ~~~ You can find a fully working example -[here](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing). +[here](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/global-namespace-with-jsdom-unit-testing). ## How to bundle an application having several entry points as exports? {#several-entry-points} diff --git a/manual/src/ornate/getting-started.md b/manual/src/ornate/getting-started.md index 70614084..dd35b516 100644 --- a/manual/src/ornate/getting-started.md +++ b/manual/src/ornate/getting-started.md @@ -39,7 +39,7 @@ npmDependencies in Compile += "snabbdom" -> "0.5.3" > You will most probably want to write a [Scala.js facade](https://www.scala-js.org/doc/interoperability/facade-types.html#-imports-from-other-javascript-modules) > for the JavaScript module. You can find information on how to do that in the > [cookbook](cookbook.md#facade), or draw inspiration from -> [this example](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/browserless/src/main/scala/uuid/uuid.scala). +> [this example](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/browserless/src/main/scala/uuid/uuid.scala). Then, use the `fastOptJS::webpack` sbt command to download the npm packages and bundle your Scala.js application and its dependencies into a single JavaScript file executable by a web browser. @@ -47,7 +47,7 @@ application and its dependencies into a single JavaScript file executable by a w In this example, the `webpack` sbt task produces a single file located at `target/scala-2.12/scalajs-bundler/main/-fastopt-bundle.js`. -See complete examples in the [tests](https://github.com/scalacenter/scalajs-bundler/tree/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler). +See complete examples in the [tests](https://github.com/scalacenter/scalajs-bundler/tree/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler). ## Integrating with sbt-web {#sbt-web} @@ -81,4 +81,4 @@ mappings to source files copied to a hash path, which conflict with `ScalaJSBund The `WebScalaJSBundlerPlugin` plugin automatically configures the `scalaJSPipeline` task to use the bundles rather than the output of the Scala.js compilation. -You can see a complete example [here](https://github.com/scalacenter/scalajs-bundler/tree/master/sbt-web-scalajs-bundler/src/sbt-test/sbt-web-scalajs-bundler/play). +You can see a complete example [here](https://github.com/scalacenter/scalajs-bundler/tree/ma/sbt-web-scalajs-bundler/src/sbt-test/sbt-web-scalajs-bundler/play). diff --git a/manual/src/ornate/reference.md b/manual/src/ornate/reference.md index ea53a384..12c8ff93 100644 --- a/manual/src/ornate/reference.md +++ b/manual/src/ornate/reference.md @@ -39,7 +39,7 @@ npmDependencies in Test += "jasmine" -> "2.5.2" Last but not least, the `.js` files that are in your classpath and in the `jsSourceDirectories` are automatically copied to the working directory of the `node` command. This means that you can also `@JSImport` these modules from your Scala facades (you can see an example -[here](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/js-resources/src/main/scala/example/MyModule.scala#L6)). +[here](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/js-resources/src/main/scala/example/MyModule.scala#L6)). ### jsdom Support for Tests {#jsdom} @@ -53,7 +53,7 @@ Then, `ScalaJSBundlerPlugin` will automatically download jsdom and bundle the te their execution so that they can be loaded by jsdom. You can find an example of project requiring the DOM for its tests -[here](https://github.com/scalacenter/scalajs-bundler/blob/master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/). +[here](https://github.com/scalacenter/scalajs-bundler/blob/main/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/static/). ### Yarn {#yarn}