Coder Social home page Coder Social logo

ts-transform-inferno's Introduction

ts-transform-inferno

travis npm version

Typescript transformer for InfernoJS.

A Typescript transformer is like a plugin to the Typescript compiler, so if you're using Typescript anyway in your project you don't need Babel as a dependency.

Install

yarn add -D ts-transform-inferno typescript

General usage

const transformInferno = require('ts-transform-inferno').default

transformInferno()

It's different depending on what bundler you're using. Please check the examples folder.

Usage with css-modules-next

Check out the examples folder here.

Usage with classcat

The examples are already using this. It's a custom transformer than comes before ts-transform-inferno. More about it here.

Usage with FuseBox (recommended)

Look into the examples/fuse-box folder and the fuse.js file.

You could also try to build the project by running the following commands:

cd examples/fuse-box && npm install

npm run start:dev or npm run start:prod

Usage with webpack and ts-loader

Look into the examples/webpack folder and its webpack config.

You could also try to build the project by running the following commands:

cd examples/webpack && npm install

npm run build:prod or npm start

Testing

You can run the following command to test: npm test

Adding test cases

Write your test in a .tsx file and add it to tests/cases.

Compile with npm test and look into the tests/temp and verify.

Overwrite references by running the following command: npm run overwrite-references

Run npm test again to verify that all tests are passing.

Credits

Very much inspired by these projects:

ts-transform-inferno's People

Contributors

deamme avatar salvatorepreviti avatar hronro avatar disposaboy avatar nykula avatar

Watchers

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