Skip to content

Commit 6e4930c

Browse files
authored
test: add rebuild step to webpack bundling example (#284)
1 parent f519ab1 commit 6e4930c

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/webpack.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ jobs:
3939
shell: bash
4040
working-directory: ./test/bundling/webpack
4141
run: |
42-
npm run build
42+
npm run build
43+
44+
- name: "Run bundled script"
45+
shell: bash
46+
working-directory: ./test/bundling/webpack
47+
run: |
48+
node dist/main.js

test/bundling/webpack/install_kerberos.cjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@ xtrace('npm pack --pack-destination test/bundling/webpack', { cwd: kerberosRoot
2323
// --ignore-scripts: don't worry about downloading prebuilt binaries, we're only bundling
2424
xtrace(`npm install --ignore-scripts --no-save kerberos-${kerberosVersion}.tgz`);
2525

26-
console.log('kerberos installed!');
26+
console.log('kerberos unpacked! Now rebuilding...');
27+
28+
// build .node
29+
xtrace(`npm rebuild kerberos`);
30+
31+
console.log('kerberos installed and built!');

test/bundling/webpack/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ In order to use kerberos with webpack there are two changes beyond the default c
99

1010
To use this bundler test:
1111
- Make changes to bson
12-
- run `npm run build` in the root of the repo to rebuild the kerberos src
1312
- in this directory run `npm run install:kerberos` to install kerberos as if it were from npm
1413
- We use a `.tgz` install to make sure we're using exactly what will be published to npm
1514
- run `npm run build` to check that webpack can pull in the changes

0 commit comments

Comments
 (0)