Skip to content

Commit

Permalink
[bundling-edits] bundle and packaging updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrein committed Dec 11, 2018
1 parent 5700836 commit 5e19cce
Show file tree
Hide file tree
Showing 12 changed files with 3,521 additions and 9,207 deletions.
20 changes: 14 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"presets": ["react", "env"],
"presets": [
"flow",
["env", {"modules": false}]
],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread",
["module-resolver", {
"alias": {
"Openlaw": "./build/Openlaw.bundle.js"
}
["transform-runtime", {
"polyfill": false,
"regenerator": true,
"moduleName": "babel-runtime"
}]
// ["module-resolver", {
// "alias": {
// "Openlaw": "./target/scala-2.12/client.js"
// }
// }]
],
"ignore": [
"./build/Openlaw.bundle.js"
"./target/scala-2.12/client.js"
]
}
11 changes: 4 additions & 7 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
[ignore]
.*/project/target/.*
.*/node_modules/fbjs/.*
.*/node_modules/config-chain/test/broken.json
.*/node_modules/.*/test/broken.json
.*/node_modules/oboe/test/json/incomplete.json
.*/node_modules/npmconf/test/.*
.*/node_modules/webpack-cli/.*
./project/*.
./src/*.
./target/*.

[include]
./js/src

[libs]

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")
javacOptions ++= Seq("-Xms512M", "-Xmx1024M", "-Xss1M", "-XX:+CMSClassUnloadingEnabled")

lazy val root = (project in file(".")).settings(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule)},
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule)},
resolvers ++= repositories,
organization := "org.openlaw",
name := "openlaw-core-client",
Expand Down
2 changes: 1 addition & 1 deletion js/src/APIClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,4 +569,4 @@ class APIClient {

}

module.exports = APIClient;
export default APIClient;
9 changes: 7 additions & 2 deletions js/src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
export {Openlaw} from 'Openlaw';
export {default as APIClient} from './APIClient';
import APIClient from './APIClient';
import {Openlaw} from '../../target/scala-2.12/client.js';

export {
APIClient,
Openlaw as default,
};
28 changes: 0 additions & 28 deletions libs.webpack.config.js

This file was deleted.

Loading

0 comments on commit 5e19cce

Please sign in to comment.