Code Monkey home page Code Monkey logo

repl's Introduction

Fable REPL

Building locally

To develop the REPL locally, run the WatchApp FAKE target and then open localhost:8080 in your browser.

How to add a sample

To add a sample, you need to add an .fs file to the public/samples/Samples.fsproj project (and a corresponding .html file if necessary), then update public/samples/samples.json. This file is used to generate the samples menu in the browser. This commit is a good example of adding a sample (pun intended).

If you just want to update on the existing samples, you can do it directly using Github UI and send a PR automatically.

You can add three types of entries:

  • Category: Adds a title entry to the menu
  • SubCategory: Adds an entry under a category, and make it collapsible
  • MenuItem: Adds a classic item which when clicked will load the sample into the REPL

Category

{
    "type": "category",
    "label": "Learn Fable",
    "children": [
    ]
}
  • label: Will be displayed as the title of the category
  • children: A list of SubCategory or MenuItem

SubCategory

{
    "type": "sub-category",
    "label": "Interop",
    "children": [
    ]
}
  • label: Will be displayed as the title of the SubCategory
  • children: A list of MenuItem

MenuItem

{
    "type": "menu-item",
    "label": "Basic canvas",
    "fsharpCode": "basic-canvas/basic_canvas.fs",
    "htmlCode": "basic-canvas/basic_canvas.html"
}
  • label: Name to display in the menu item
  • fsharpCode: Relative url of the F# code
  • htmlCode (optional field): Relative url of the html code
  • cssCode (optional field): Relative url of the css code

All the urls for fsharpCode, htmlCode are relative to the public/samples folder.

repl's People

Contributors

alfonsogarciacaro avatar brikken avatar cartermp avatar chadunit avatar dependabot[bot] avatar et1975 avatar forki avatar krauthaufen avatar ncave avatar nhowka avatar vbfox avatar voronoipotato avatar xdadaveshaw avatar zaid-ajaj avatar

Watchers

 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.