Giter Site home page Giter Site logo

typescriptextjsemitter's Introduction

TypeScript ExtJS Emitter

A fork of Typescript 1.0.3 that emits classes in a way that ExtJS understands.

##Why?

The Javascript emitted by the Typescript compiler is not compatible with the ExtJS class system. ExtJS requires classes to be defined using syntax like Ext.define(CLASSNAME, MEMBERS); but Typescript emits code based around prototypes.

This forked compiler emits code that looks just like the ExtJS classes you would write in regular Javascript.

##ExtJS API Type Declarations

To get the most use out of this compiler you will also need some type declarations (*.d.ts files) for the ExtJS API. There is a companion project to provide these: https://github.com/Dretch/typescript-declarations-for-ext

##Screenshot ScreenShot

##Demo

https://rawgithub.com/fabioparra/TypeScriptExtJSEmitter/master/TypeScriptExtJSEmitter/index.html

##Compatability

This project is compatible with Typescript 1.0.3 and ExtJS 4 and 5. The emitted classes can be processed by Sencha CMD. Typescript 1.4 support is planned.

##Usage with Visual Studio

####Update tsc.js and lib.d.ts files (eg: visual studio build task)

visual studio folder C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0

https://github.com/fabioparra/TypeScriptExtJSEmitter/blob/master/TypeScriptExtJSEmitter/js/compiler/tsc.js https://github.com/fabioparra/TypeScriptExtJSEmitter/blob/master/TypeScriptExtJSEmitter/js/compiler/lib.d.ts

####Update typescriptServices.js and lib.d.ts files (eg: visual studio plugin)

visual studio folder (vary by version) C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript

https://github.com/fabioparra/TypeScriptExtJSEmitter/blob/master/TypeScriptExtJSEmitter/js/compiler/typescriptServices.js https://github.com/fabioparra/TypeScriptExtJSEmitter/blob/master/TypeScriptExtJSEmitter/js/compiler/lib.d.ts

##Usage with IntelliJ IDEA

IntelliJ IDEA 14 (Ultimate Edition only) has Typescript support. The ExtJS emitter can be used instead of the regular compiler.

Follow the instructions for setting up regular Typescript support (https://www.jetbrains.com/idea/help/typescript-support.html) but ensure that you do the following:

  1. Install the regular Typescript transpiler, version 1.0.1 (i.e. npm install [email protected]), at the project level rather than globally, and don't add it to the PATH variable. This means you can still use the regular Typescript emitter for other projects.

  2. Edit the file watcher that IntelliJ creates for Typescript so that it uses the project tsc (node_modules/typescript/bin/tsc) rather than the global one.

  3. Replace these files inside the project's Typescript installation (node_modules/typescript/bin):

##Source Code

https://typescript.codeplex.com/SourceControl/network/forks/fabioparra/ExtJSEmitter

obs: Changes made only in TypeScript.Emitter class

typescriptextjsemitter's People

Contributors

fabioparra avatar dretch avatar

Watchers

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.