diff --git a/package.json b/package.json index 9518b6a472..1dfe812c8f 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build/", "*.md", "!*.spec.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/amino/karma.conf.cjs b/packages/amino/karma.conf.cjs index cb9fe44683..38b12a77a0 100644 --- a/packages/amino/karma.conf.cjs +++ b/packages/amino/karma.conf.cjs @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["build/karma-bundle/tests.js"], client: { jasmine: { diff --git a/packages/amino/package.json b/packages/amino/package.json index 05243001bd..bbbf68d1a7 100644 --- a/packages/amino/package.json +++ b/packages/amino/package.json @@ -15,6 +15,7 @@ "*.md", "!*.spec.*", "!*testutils.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/amino/webpack.web.config.cjs b/packages/amino/webpack.web.config.cjs index 905426a47c..897db8708c 100644 --- a/packages/amino/webpack.web.config.cjs +++ b/packages/amino/webpack.web.config.cjs @@ -2,7 +2,7 @@ const { globSync } = require("glob"); const path = require("path"); const target = "web"; -const distdir = path.join(__dirname, "dist", "web"); +const bundleDir = path.join(__dirname, "build", "karma-bundle"); module.exports = [ { @@ -11,7 +11,7 @@ module.exports = [ entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "tests.js", }, resolve: { diff --git a/packages/cosmwasm-stargate/karma.conf.cjs b/packages/cosmwasm-stargate/karma.conf.cjs index cb9fe44683..38b12a77a0 100644 --- a/packages/cosmwasm-stargate/karma.conf.cjs +++ b/packages/cosmwasm-stargate/karma.conf.cjs @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["build/karma-bundle/tests.js"], client: { jasmine: { diff --git a/packages/cosmwasm-stargate/package.json b/packages/cosmwasm-stargate/package.json index 5358b3ec20..f87b57b65d 100644 --- a/packages/cosmwasm-stargate/package.json +++ b/packages/cosmwasm-stargate/package.json @@ -15,6 +15,7 @@ "*.md", "!*.spec.*", "!*testutils.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/cosmwasm-stargate/webpack.web.config.cjs b/packages/cosmwasm-stargate/webpack.web.config.cjs index 5378a584e2..1628061f56 100644 --- a/packages/cosmwasm-stargate/webpack.web.config.cjs +++ b/packages/cosmwasm-stargate/webpack.web.config.cjs @@ -3,7 +3,7 @@ const path = require("path"); const webpack = require("webpack"); const target = "web"; -const distdir = path.join(__dirname, "dist", "web"); +const bundleDir = path.join(__dirname, "build", "karma-bundle"); module.exports = [ { @@ -12,7 +12,7 @@ module.exports = [ entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "tests.js", }, plugins: [ diff --git a/packages/crypto/karma.conf.cjs b/packages/crypto/karma.conf.cjs index cb9fe44683..38b12a77a0 100644 --- a/packages/crypto/karma.conf.cjs +++ b/packages/crypto/karma.conf.cjs @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["build/karma-bundle/tests.js"], client: { jasmine: { diff --git a/packages/crypto/package.json b/packages/crypto/package.json index a7e5ca17aa..20bf887369 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -15,6 +15,7 @@ "build/", "*.md", "!*.spec.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/crypto/webpack.web.config.cjs b/packages/crypto/webpack.web.config.cjs index 905426a47c..897db8708c 100644 --- a/packages/crypto/webpack.web.config.cjs +++ b/packages/crypto/webpack.web.config.cjs @@ -2,7 +2,7 @@ const { globSync } = require("glob"); const path = require("path"); const target = "web"; -const distdir = path.join(__dirname, "dist", "web"); +const bundleDir = path.join(__dirname, "build", "karma-bundle"); module.exports = [ { @@ -11,7 +11,7 @@ module.exports = [ entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "tests.js", }, resolve: { diff --git a/packages/encoding/karma.conf.cjs b/packages/encoding/karma.conf.cjs index cb9fe44683..38b12a77a0 100644 --- a/packages/encoding/karma.conf.cjs +++ b/packages/encoding/karma.conf.cjs @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["build/karma-bundle/tests.js"], client: { jasmine: { diff --git a/packages/encoding/package.json b/packages/encoding/package.json index b56ac0b938..8169eb0b21 100644 --- a/packages/encoding/package.json +++ b/packages/encoding/package.json @@ -14,6 +14,7 @@ "build/", "*.md", "!*.spec.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/encoding/webpack.web.config.cjs b/packages/encoding/webpack.web.config.cjs index 13b8407815..73f95968aa 100644 --- a/packages/encoding/webpack.web.config.cjs +++ b/packages/encoding/webpack.web.config.cjs @@ -2,7 +2,7 @@ const { globSync } = require("glob"); const path = require("path"); const target = "web"; -const distdir = path.join(__dirname, "dist", "web"); +const bundleDir = path.join(__dirname, "build", "karma-bundle"); module.exports = [ { @@ -11,7 +11,7 @@ module.exports = [ entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "tests.js", }, resolve: { diff --git a/packages/faucet-client/karma.conf.cjs b/packages/faucet-client/karma.conf.cjs index cb9fe44683..38b12a77a0 100644 --- a/packages/faucet-client/karma.conf.cjs +++ b/packages/faucet-client/karma.conf.cjs @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["build/karma-bundle/tests.js"], client: { jasmine: { diff --git a/packages/faucet-client/package.json b/packages/faucet-client/package.json index ccaab872d8..9869034845 100644 --- a/packages/faucet-client/package.json +++ b/packages/faucet-client/package.json @@ -14,6 +14,7 @@ "build/", "*.md", "!*.spec.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/faucet-client/webpack.web.config.cjs b/packages/faucet-client/webpack.web.config.cjs index 414894e663..b18cfd1079 100644 --- a/packages/faucet-client/webpack.web.config.cjs +++ b/packages/faucet-client/webpack.web.config.cjs @@ -3,7 +3,7 @@ const path = require("path"); const webpack = require("webpack"); const target = "web"; -const distdir = path.join(__dirname, "dist", "web"); +const bundleDir = path.join(__dirname, "build", "karma-bundle"); module.exports = [ { @@ -12,7 +12,7 @@ module.exports = [ entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "tests.js", }, plugins: [new webpack.EnvironmentPlugin({ FAUCET_ENABLED: "" })], diff --git a/packages/faucet/bin/cosmos-faucet-dist b/packages/faucet/bin/cosmos-faucet-dist index 6ec8dca257..d1f34d5faf 100755 --- a/packages/faucet/bin/cosmos-faucet-dist +++ b/packages/faucet/bin/cosmos-faucet-dist @@ -2,5 +2,5 @@ const path = require("path"); // attempt to call in main file.... -const faucet = require(path.join(__dirname, "..", "dist", "node", "cli.js")); +const faucet = require(path.join(__dirname, "..", "build", "cli-bundle", "cli.js")); faucet.main(process.argv.slice(2)); diff --git a/packages/faucet/package.json b/packages/faucet/package.json index 8792e077b7..31dfd768b7 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -16,6 +16,8 @@ "*.md", "!*.spec.*", "!*testutils.*", + "!**/cli-bundle/", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/faucet/webpack.node.config.cjs b/packages/faucet/webpack.node.config.cjs index b8c80a73f6..e51bff4e73 100644 --- a/packages/faucet/webpack.node.config.cjs +++ b/packages/faucet/webpack.node.config.cjs @@ -1,15 +1,14 @@ const path = require("path"); -const target = "node"; -const distdir = path.join(__dirname, "dist", target); +const cliBundleDir = path.join(__dirname, "build", "cli-bundle"); module.exports = [ { - target: target, + target: "node", entry: "./build/cli.js", output: { asyncChunks: false, - path: distdir, + path: cliBundleDir, filename: "cli.js", library: { type: "commonjs", diff --git a/packages/json-rpc/karma.conf.cjs b/packages/json-rpc/karma.conf.cjs index cfa5475418..45f9593f13 100644 --- a/packages/json-rpc/karma.conf.cjs +++ b/packages/json-rpc/karma.conf.cjs @@ -16,9 +16,9 @@ module.exports = function (config) { // list of files / patterns to load in the browser files: [ - "dist/web/tests.js", + "build/karma-bundle/tests.js", { - pattern: "dist/web/dummyservice.worker.js", + pattern: "build/karma-bundle/dummyservice.worker.js", included: false, served: true, watched: false, diff --git a/packages/json-rpc/package.json b/packages/json-rpc/package.json index a4dc23e390..8fd774851d 100644 --- a/packages/json-rpc/package.json +++ b/packages/json-rpc/package.json @@ -16,6 +16,7 @@ "build/", "*.md", "!*.spec.*", + "!**/karma-bundle/", "!**/testdata/" ], "repository": { diff --git a/packages/json-rpc/src/jsonrpcclient.spec.ts b/packages/json-rpc/src/jsonrpcclient.spec.ts index 2e26238072..d4baad6d22 100644 --- a/packages/json-rpc/src/jsonrpcclient.spec.ts +++ b/packages/json-rpc/src/jsonrpcclient.spec.ts @@ -29,7 +29,7 @@ function makeSimpleMessagingConnection( } (typeof Worker !== "undefined" ? describe : xdescribe)("JsonRpcClient", () => { - const dummyserviceKarmaUrl = "/base/dist/web/dummyservice.worker.js"; + const dummyserviceKarmaUrl = "/base/build/karma-bundle/dummyservice.worker.js"; it("can be constructed with a Worker", () => { const worker = new Worker(dummyserviceKarmaUrl); diff --git a/packages/json-rpc/webpack.web.config.cjs b/packages/json-rpc/webpack.web.config.cjs index ffce4c6b08..996d7f67b4 100644 --- a/packages/json-rpc/webpack.web.config.cjs +++ b/packages/json-rpc/webpack.web.config.cjs @@ -2,7 +2,7 @@ const { globSync } = require("glob"); const path = require("path"); const target = "web"; -const distdir = path.join(__dirname, "dist", "web"); +const bundleDir = path.join(__dirname, "build", "karma-bundle"); module.exports = [ { @@ -11,7 +11,7 @@ module.exports = [ entry: "./build/workers/dummyservice.worker.js", output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "dummyservice.worker.js", }, }, @@ -21,7 +21,7 @@ module.exports = [ entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { asyncChunks: false, - path: distdir, + path: bundleDir, filename: "tests.js", }, }, diff --git a/packages/ledger-amino/README.md b/packages/ledger-amino/README.md index ad41645bf7..de192585ae 100644 --- a/packages/ledger-amino/README.md +++ b/packages/ledger-amino/README.md @@ -35,8 +35,8 @@ yarn demo-node Serve the project locally: ```sh -# Build the package for web -yarn pack-web +# Build and bundle the demo for web +yarn pack-demo-web # Host the `ledger-amino` package directory, for example using Python 3 python3 -m http.server diff --git a/packages/ledger-amino/demo/index.html b/packages/ledger-amino/demo/index.html index d2ca617a76..88c4dca936 100644 --- a/packages/ledger-amino/demo/index.html +++ b/packages/ledger-amino/demo/index.html @@ -5,7 +5,7 @@