Permalink
Browse files

introduce bucklescript and reason

  • Loading branch information...
tcoopman committed Sep 30, 2017
1 parent 1d19580 commit b22bacef7629ae574282c31a46e9445ba7759456
Showing with 60 additions and 3 deletions.
  1. +3 −1 .gitignore
  2. +9 −0 bsconfig.json
  3. +27 −0 package-lock.json
  4. +3 −0 package.json
  5. +2 −0 src/Bucklescript.ml
  6. +1 −0 src/Reason.re
  7. +5 −1 src/index.ts
  8. +10 −1 webpack.config.js
@@ -1,2 +1,4 @@
node_modules
dist
dist
lib
.merlin
@@ -0,0 +1,9 @@
{
"name": "typescript-with-bucklescript",
"version": "0.1.0",
"sources": [
"src"
],
"package-specs": ["es6"],
"bsc-flags": [ "-bs-super-errors -no-alias-deps", "-color", "always"]
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -9,6 +9,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "^8.0.31",
"bs-loader": "^1.8.0",
"bs-platform": "^1.9.3",
"source-map-loader": "^0.2.2",
"ts-loader": "^2.3.7",
"typescript": "^2.5.3",
@@ -0,0 +1,2 @@
let hello name =
Js.log {j|Hi $(name), from Bucklescript.|j}
@@ -0,0 +1 @@
let hello name => Js.log {j|Hi $(name), from Reason.|j};
@@ -1 +1,5 @@
console.log("Hello from Typescript");
const helloBucklescript = require('./Bucklescript').hello;
const helloReason = require('./Reason').hello;

helloBucklescript('Typescript');
helloReason('Typescript');
@@ -14,7 +14,7 @@ module.exports = {
publicPath: '/dist/',
},
resolve: {
extensions: ['.js', '.ts'],
extensions: ['.js', '.ts', '.ml', '.re'],
},
module: {
rules: [
@@ -30,6 +30,15 @@ module.exports = {
loaders: ['ts-loader'],
exclude: /node_modules/
},
{
test: /\.(re|ml)$/,
use: {
loader: 'bs-loader',
options: {
module: 'es6',
}
}
},
]
}
};

0 comments on commit b22bace

Please sign in to comment.