dharijanto / transpile-nodejs-to-jscore

Transpile nodejs code into Swift's JSCore compatible javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

This repo is an example of using webpack to bundle NodeJS code into a javascript file that can be executed by JSContext.

Configuration

  • webpack.config.js
    • output.library.name: "bundle": this creates a new variable bundle that contains the exports
  • index.js
    • exports.marked = marked
  • In the case above, it will expose "bundle.marked"

About

Transpile nodejs code into Swift's JSCore compatible javascript


Languages

Language:JavaScript 100.0%