ScalablyTyped

ScalablyTyped

  • Github

›Getting started (application)

ScalablyTyped

  • Use Typescript libraries with Scala.js!

Getting started (application)

  • SBT plugin
  • SBT plugin without scalajs-bundler
  • Command line tool

Getting started (library)

  • How to share code

Usage

  • What do I do now?
  • Working with objects
  • Flavour
  • Encoding

Configuration

  • Customize the generated code.
  • Remote cache

Development

  • What if I hit problems importing libraries?
  • Development
  • Running

SBT plugin without scalajs-bundler

  • I want to use scalajs-bundler (recommended)
  • I want to use mill
  • I can't/won't use sbt nor mill

Ensure you use the correct plugin

  project.enablePlugins(ScalablyTypedConverterExternalNpmPlugin)

Implement externalNpm

You need to implement the externalNpm task yourself. You should call npm or yarn yourself, and return the directory where both package.json and node_modules can be found.

This example uses the directory of the sbt project.

project.settings(
    externalNpm := {
      Process("yarn", baseDirectory.value).!
      baseDirectory.value
    }
)

Follow the normal instructions

The rest of Getting started with SBT plugin applies.

You can check out the storybook-react and react-native demos in SlinkyDemos for complete examples.

Customize the generated code

While optional, it's recommended to have a look at conversion options to see what the possibilities are.

Now what?

Have a look at Where do I start?

← SBT pluginCommand line tool →
  • Ensure you use the correct plugin
  • Implement externalNpm
  • Follow the normal instructions
  • Customize the generated code
ScalablyTyped
Community
Project Chat
More
GitHubStar
Copyright © 2024 Øyvind Raddum Berg