Skip to content

Instantly share code, notes, and snippets.

View crissmoldovan's full-sized avatar

Cristian Moldovan crissmoldovan

View GitHub Profile
@crissmoldovan
crissmoldovan / JSON-IR-Example.json
Last active September 11, 2018 15:14
Basic Example of JSON-IR
{
"type": "View",
"name": "Main",
"style": {
"position": "absolute",
"top": 242,
"left": 335,
"width": 395,
"height": 190,
"background": {
import React, { Component } from 'react'
export default class HelloWorld extends Component {
render() {
return (
<div style={styles.Main}>
<span style={styles.Hello}>Hello World</span>
<img src={'/static/hello-world_world.png'} style={styles.World} />
</div>
)
import React, { Component } from 'react'
import { View, Text, Image, StyleSheet } from 'react-native'
export default class HelloWorld extends Component {
render() {
return (
<View style={styles.Main}>
<Text style={styles.Hello}>Hello World</Text>
<Image source={require('/static/hello-world_world.png')} style={styles.World} />
</View>
@crissmoldovan
crissmoldovan / parse.js
Created September 17, 2020 21:52 — forked from RoystonS/parse.js
Parses a TS/TSX file to extract props for any exports, using TypeScript compiler
"use strict";
// Demonstrates extracting complete props info, using real TypeScript
// compiler type info.
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
//
var ts = require("typescript");
var fs = require("fs");
var path = require("path");
// Arguments: