ArpNetworking / sbt-typescript

A plugin for SBT that uses sbt-web to compile typescript resources.
Apache License 2.0
60 stars 26 forks source link

Hey I can't configure configFile and sourceRoot #73

Open seanpmaxwell opened 4 years ago

seanpmaxwell commented 4 years ago

The README doesn't explain how to actually set these two settings in the build.sbt files. Sorry I'm new to scala. I'm trying like this please help.

configFile in (Assets, typescript) := "tsconfig.json"
sourceRoot in (Assets, typescript) := baseDirectory.value.toSt
Mat2095 commented 4 years ago

TypescriptKeys.configFile := "./tsconfig.json" worked for me, but I have no idea if that is a good way.

seanpmaxwell commented 4 years ago

I really wish they'd show in the readme how to do this.

Mat2095 commented 4 years ago

So did my method work for you?

seanpmaxwell commented 4 years ago

Not still not working. Here's my build.sbt file

import com.arpnetworking.sbt.typescript.Import.TypescriptKeys

name := """play-java-hello-world-tutorial"""
organization := "com.example"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.13.1"

libraryDependencies += guice

JsEngineKeys.engineType := JsEngineKeys.EngineType.Node

TypescriptKeys.configFile := "./tsconfig.json"
TypescriptKeys.sourceRoot := "./"

here's my tsconfig file

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["es2018", "dom"],
    "module": "amd",
    "moduleResolution": "classic",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": true,
    "noImplicitAny": true,
    "noImplicitReturns": true,
    "sourceMap": true,
    "jsx": "react",
    "outDir": "./"
  }
}