This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
/* | |
* Webpack 2 loader that can take CommonJS output by psc 0.9.1 and convert | |
* it into tree shakable ES6 modules. No transpiling required. | |
*/ | |
const fs = require('fs') | |
const commonJsRequire = /var ([_$a-zA-Z0-9]+) = require\([\'\"]([^\'\"]+)[\'\"]\)/g | |
const moduleExports = /module\.exports = \{(\n( ([\"\'_$a-zA-Z0-9]+): ([_$a-zA-Z0-9\.]+)(, )?\n)*)?\};/m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Class | |
import Control.Monad.Aff (launchAff, Aff, makeAff, attempt) | |
import Control.Monad.Aff.Console (CONSOLE, log) | |
import Control.Monad.Eff.Exception (Error, try) | |
import Network.HTTP.Affjax as Ajax | |
import Data.Either (Either(..), either) |