GithubHelp home page GithubHelp logo

kwark / sbt-typescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crooy/sbt-typescript

0.0 3.0 0.0 1017 KB

TypeScript compiler in SBT

License: Other

Scala 0.31% TypeScript 0.01% JavaScript 99.68%

sbt-typescript's Introduction

sbt-typescript

An SBT plugin to run the TypeScript compiler inside of SBT.

The Typescript compiler is provided by this fork. This fork also supports compilation of typescript classes to ExtJs classes.

Currently it supports typescript 1.8

To use this plugin add the following to your plugins.sbt file:

addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.4.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-js-engine" % "1.2.3")
addSbtPlugin("be.venneborg.sbt" % "sbt-typescript" % "1.1.0")

This plugin is compatible with sbt-web.

Usage

Simply run the tsc command to invoke the TypeScript compiler.

Use with sbt-web

To use this plugin with sbt-web start by enabling SbtWeb in your build.sbt file:

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

Once configured, any *.ts files placed in src/main/assets will be compiled to JavaScript code in target/web/public.

Supported settings:

  • sourceMap When set, generates sourceMap files. Defaults to false.

    TypeScriptKeys.sourceMap := true

  • esTarget Which ECMAScript version to transpile to . Defaults to ES5.

    TypeScriptKeys.esTarget := 'ES5'

  • noImplicitAny When set, warn on expressions and declarations with an implied 'any' type. Default to false.

    TypeScriptKeys.noImplicitAny := true

  • removeComments When set, do not emit comments to output. Defaults to false.

    TypeScriptKeys.removeComments := true

  • moduleType Specify module code generation: Can be 'ExtJs', 'Commonjs' or 'Amd'. Defaults to ExtJs.

    TypeScriptKeys.moduleType in Assets := TypeScriptKeys.ModuleType.Amd TypeScriptKeys.moduleType in TestAssets := TypeScriptKeys.ModuleType.CommonJs

The plugin is built on top of JavaScript Engine which supports different JavaScript runtimes.

sbt-typescript's People

Contributors

kwark avatar crooy avatar fornever avatar tgambet avatar u-abramchuk avatar

Watchers

 avatar James Cloos avatar  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.