Skip to content

Commit

Permalink
ci: test bundling taquito-beacon-wallet in ci (#2744)
Browse files Browse the repository at this point in the history
Co-authored-by: Davis Sawali <[email protected]>
  • Loading branch information
hui-an-yang and dsawali authored Mar 5, 2024
1 parent 9f151ec commit 9f1718b
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/bundle_webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
bundle-webpack:
runs-on: ubuntu-latest
steps:
-
-
name: Checkout repository
uses: actions/checkout@v2
-
Expand All @@ -22,11 +22,20 @@ jobs:
node-version: lts/hydrogen
- run: npm ci
- run: npm run build
- run: cd packages/taquito-local-forging && npm run build-webpack
- run: npm -w packages/taquito-local-forging run build-webpack
-
uses: actions/upload-artifact@v3
with:
name: taquito-local-forging-vanilla
path: |
packages/taquito-local-forging/dist/taquito_local_forging.js
packages/taquito-local-forging/dist/taquito_local_forging.js.map
- run: npm -w packages/taquito-beacon-wallet run build-webpack
-
uses: actions/upload-artifact@v3
with:
name: taquito-beacon-wallet-vanilla
path: |
packages/taquito-beacon-wallet/dist/taquito_beacon_wallet.js
packages/taquito-beacon-wallet/dist/taquito_beacon_wallet.js.map
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/taquito-beacon-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"prebuild": "rimraf dist",
"version-stamp": "node ../taquito/version-stamping.js",
"build": "tsc --project ./tsconfig.prod.json --module commonjs && rollup -c rollup.config.ts --bundleConfigAsCjs",
"start": "rollup -c rollup.config.ts --bundleConfigAsCjs -w"
"start": "rollup -c rollup.config.ts --bundleConfigAsCjs -w",
"build-webpack": "webpack --progress --color"
},
"lint-staged": {
"{src,test}/**/*.ts": [
Expand Down Expand Up @@ -97,7 +98,9 @@
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"ts-toolbelt": "^9.6.0",
"typescript": "5.2.2"
"typescript": "5.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"gitHead": "551e35aeff7d6dcde1c72284238c0ed3c3aae77e"
}
37 changes: 37 additions & 0 deletions packages/taquito-beacon-wallet/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const webpack = require('webpack');
const path = require('path');

module.exports = {
entry: {
"taquito_beacon_wallet": ['./src/taquito-beacon-wallet.ts']
},
mode: 'production',
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
devtool: 'source-map',
resolve: {
extensions: ['.tsx', '.ts', '.js'],
modules: ['node_modules'],
fallback: {
fs: false,
stream: require.resolve("stream-browserify")
}
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
library: ['[name]'],
libraryTarget: "var"
},
plugins: [
new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'] })
]
};

0 comments on commit 9f1718b

Please sign in to comment.