Coder Social home page Coder Social logo

elephize's Introduction

Elephize

Library and tool for transpiling limited set of React & Typescript constructions into PHP for use in server-side rendering.

Usage

NPM:

npm install -D @vkontakte/elephize or yarn add -D @vkontakte/elephize

Check error messages for peerDependencies errors, as elephize requires typescript to work.

Play with lib and demo (github):

git clone https://github.com/VKCOM/elephize.git

cd elephize && yarn

yarn demo_start

This will set up demo files in demo/public folder and run two servers:

  • React node server with native ReactDOM on port 3000
  • Php simple server with transpiled sources on port 8000

To see help, use bin/elephize --help or ./node_modules/.bin/elephize --help if you've installed elephize as a module.

You can use debugger; statement in your ts code to debug transpilation process and check context variables. When run with node debugger, this statement will pause the execution process when source file transpilation reaches the statement. It's useful to combine it with manual breakpoints to check particular cases.

Documentation (ru)

Documentation (en)

Help wanted! If you have time to translate docs to english, please feel free to send us your PRs.

elephize's People

Contributors

ctizen avatar k-egor-smirnov avatar dependabot[bot] 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.