Coder Social home page Coder Social logo

michae1duncan / live-demo-coding-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ycabon/live-demo-coding-app

0.0 2.0 0.0 6.98 MB

Bootstrap application that allows the presenter to live code and get the demo updated at runtime

License: MIT License

HTML 56.59% JavaScript 43.41%

live-demo-coding-app's Introduction

Live Demo Coding Application

Bootstrap application that allows the presenter to live code and get the demo updated at runtime.

Example of application

Usage

npm install

then browse to the index.html page.

To update the compiled app, edit the code on the right and hit Ctrl+s. The code is then transpiled and executed in an iframe.

Creating new pages

I used convention to quickly create new demo apps. Here are the steps to follow to create new ones:

  • Duplicate src/demo and give it a name like src/demo2
  • Duplicate index.html and give it a name like index2.html
  • Edit index2.html
    • update the application name var app = "demo2";
    • update the typescript code that will be executing. Let's display a simple scene:
<script id="typescriptSample" type="text/typescript">
import * as Map from "esri/Map";
import * as SceneView from "esri/views/SceneView";

const map = new Map({
  basemap: "topo-vector"
});

const view = new SceneView({
  container: "viewDiv",
  map: map
});
</script>
  • optionally, update the content of the iframe src/demo2/iframe.html. This is where the SceneView's container viewDiv is defined for example.
  • optionally, update the text content of this script tag <script id="typescriptExtraLib" type="text/typescript"></script> in index2.html to declare the typescript context.
<script id="typescriptExtraLib" type="text/typescript">
import * as Map from "esri/Map";
declare var map: Map;
</script>
<script id="typescriptSample" type="text/typescript">
import * as SceneView from "esri/views/SceneView";

const view = new SceneView({
  container: "viewDiv",
  map: map
});
</script>

live-demo-coding-app's People

Contributors

ycabon avatar

Watchers

 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.