Skip to content

Commit 9309bc3

Browse files
committed
Use build/demo-bundle for for the out dir of the ledger-amino demo
1 parent 04f6a12 commit 9309bc3

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

packages/ledger-amino/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ yarn demo-node
3535
Serve the project locally:
3636

3737
```sh
38-
# Build the package for web
39-
yarn pack-web
38+
# Build and bundle the demo for web
39+
yarn pack-demo-web
4040

4141
# Host the `ledger-amino` package directory, for example using Python 3
4242
python3 -m http.server

packages/ledger-amino/demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Ledger Demo</title>
77
<link rel="stylesheet" href="index.css"></style>
8-
<script src="../dist/demo/ledger.js"></script>
8+
<script src="../build/demo-bundle/ledger.js"></script>
99
</head>
1010
<body>
1111
<section>

packages/ledger-amino/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"*.md",
1616
"!*.spec.*",
1717
"!*testutils.*",
18+
"!**/demo/",
19+
"!**/demo-bundle/",
1820
"!**/karma-bundle/",
1921
"!**/testdata/"
2022
],
@@ -36,7 +38,7 @@
3638
"test": "yarn build-or-skip && yarn test-node",
3739
"demo-node": "yarn build-or-skip && node ./demo/node.cjs",
3840
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
39-
"pack-web": "yarn build-or-skip && webpack --mode development --config webpack.demo.config.cjs"
41+
"pack-demo-web": "yarn build-or-skip && webpack --mode development --config webpack.demo.config.cjs"
4042
},
4143
"dependencies": {
4244
"@cosmjs/amino": "workspace:^",

packages/ledger-amino/webpack.demo.config.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const path = require("path");
33
const webpack = require("webpack");
44

55
const target = "web";
6-
const demodir = path.join(__dirname, "dist", "demo");
6+
const demoBundleDir = path.join(__dirname, "build", "demo-bundle");
77

88
module.exports = [
99
{
@@ -12,7 +12,7 @@ module.exports = [
1212
entry: globSync("./build/demo/web.js", { dotRelative: true }).sort(),
1313
output: {
1414
asyncChunks: false,
15-
path: demodir,
15+
path: demoBundleDir,
1616
filename: "ledger.js",
1717
},
1818
plugins: [

0 commit comments

Comments
 (0)