Giter Club home page Giter Club logo

mill-scalablytyped's Introduction

Scalablytyped Mill Plugin

Mill Plugin for Scalablytyped

Getting Started

The preferred way is to create a module in a separate build file. You need to create a scalablytyped.sc file like:

import mill._, mill.scalalib._, mill.scalajslib._
import $ivy.`com.github.lolgab::mill-scalablytyped::0.1.12`
import com.github.lolgab.mill.scalablytyped._

object `scalablytyped-module` extends ScalaJSModule with ScalablyTyped {
  def scalaVersion = "3.2.2"
  def scalaJSVersion = "1.13.0"
}

Then you can import this module in your build.sc file:

import $file.scalablytyped
import mill._, mill.scalalib._, mill.scalajslib._

object app extends ScalaJSModule {
  def scalaVersion = "3.2.2"
  def scalaJSVersion = "1.13.0"
  def moduleDeps = Seq(scalablytyped.`scalablytyped-module`)
}

After that it will scan the directory for a package.json file and a node_module directory. It will run ScalablyTyped to convert the libraries in package.json and then add them to ivyDeps.

Mill version note

Make sure to use a Mill version greater than 0.10.1 otherwise the changes to the build.sc file will re-trigger the Scalablytyped converter. Also make sure that import $file.scalablytyped is one of the first imports in your build.sc, because Ammonite recompiles all the next imported classes when a imported file changes. If the scalablytyped file is imported earlier, there are less chances of doing useless recompilations with ScalablyTyped.

Configuration

scalablyTypedBasePath

The base path where package.json and node_modules are. Defaults to the project root directory (the directory of build.sc).

scalablyTypedIgnoredLibs

The typescript dependencies to ignore during the conversion

useScalaJsDomTypes

When true (which is the default) uses scala-js-dom types when possible instead of types we translate from typescript in std

scalablyTypedFlavour

The React flavour used by ScalablyTyped Can be one of Flavour.Normal, Flavour.Slinky, Flavour.SlinkyNative and Flavour.ScalajsReact

Changelog

0.1.12

Update ScalablyTyped to 1.0.0-beta43

0.1.11

Update Mill 0.11 to 0.11.0

0.1.10

Update Mill 0.11 to 0.11.0-M10

0.1.9

Update Mill 0.11 to 0.11.0-M10

0.1.8

Update Mill 0.11 to 0.11.0-M9

0.1.7

Update Mill 0.11 to 0.11.0-M8

0.1.6

Update Mill 0.11 to 0.11.0-M7

0.1.5

Update Mill 0.11 to 0.11.0-M6

0.1.4

Update ScalablyTyped to 1.0.0-beta41 and Mill 0.11 to 0.11.0-M2

0.1.3

Update Mill 0.11.0-M1 to 0.11.0-M1-29-8f872d

0.1.2

Support Mill 0.11.0-M1

0.1.1

Support Mill 0.11.0-M0

0.1.0

Update ScalablyTyped to 1.0.0-beta40

0.0.7

Update ScalablyTyped to 1.0.0-beta39

0.0.6

Update ScalablyTyped to 1.0.0-beta38

0.0.5

Add support for scalablyTypedFlavour

0.0.4

Bump vulnerable log4j dependency

0.0.3

Improve error messages on failure

0.0.2

Add scalablyTypedBasePath and scalablyTypedIgnoredLibs configurations

0.0.1

First release

mill-scalablytyped's People

Contributors

lolgab avatar andrelfpinto avatar quafadas avatar lefou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.