Skip to content

Compile 2 JavaScript language support #1

Closed
@kebot

Description

@kebot

Thank you for your cool things about iPython Notebook.

I just make two line modify to support CoffeeScript. It works!

  function run(code) {
    var compiledCode = require('coffee-script').compile(code, {bare: true})
    if(DEBUG) { console.log("SM: COMPILED: ```\n", compiledCode, '\n') }
    return vm.runInThisContext(compiledCode);
  }

But I'm not familiar with the architecture, I'm thinking how to make it support any compiler that exists(coffeescript, babel, etc...)

Here are some ways to do it:

  1. build-in compiler ijavascript --compile coffee, compiler can provided as plugins(such as ijavascript-coffee-plugin)
  2. I also see a Cell - Cell Type in the dropdown menubar, maybe add some custom cell-type there
Code(javascript)
Code(CoffeeScript)
Code(babel)
Markdown

To implement that, there are some points

  • async compiler support
  • is Cell Type in iPython pluginable?
  • Source Map Support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions