Skip to content

Commit 0160a6e

Browse files
committed
build: generate debug artifacts too virtualfs-debug.js and virtualfs-debug.map.js
1 parent bf77daa commit 0160a6e

File tree

12 files changed

+20484
-39
lines changed

12 files changed

+20484
-39
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ src/**/*-min.js
44
src/**/*.min.js
55
test/virtualfs.js
66
test/virtualfs.js.map
7+
test/virtualfs-debug.js
8+
test/virtualfs-debug.js.map

.github/workflows/test-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
npm install
3030
echo "npm run build not executed as we will be running tests against the checked in release artifacts only!"
31-
npm run _copy-test-dist
31+
npm run _copy-dist-to-test
3232
npm run tauri build
3333
- name: Run tauri integration tests in ubuntu
3434
if: matrix.platform == 'ubuntu-latest'

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ dist/*
1212
!dist/phoenix-fs.js
1313
test/virtualfs.js
1414
test/virtualfs.js.map
15+
16+
!dist/virtualfs-debug.js
17+
!dist/virtualfs-debug.js.map
18+
test/virtualfs-debug.js
19+
test/virtualfs-debug.js.map
20+
1521
phcode-fs-*.tgz

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,27 +234,35 @@ To build it:
234234

235235
```bash
236236
npm install
237-
npm run build:dev
237+
npm run build
238238
```
239239

240+
The `npm run build` command will create two files `dist/virtualfs.js` and `dist/virtualfs-debug.js`.
241+
Use `dist/virtualfs-debug.js` if you want to debug the phoenix filesystem lib itself.
242+
240243
## Tests in Browser
241244
While developing, use test script to open browser tests.
242245
* Test runs tests against the built artifacts in dist folder.
243246
* You should `npm run build` if any changes were made to the src folder
244247
```bash
245-
npm run build:dev
248+
npm run build
246249
npm run test-browser
247250
```
248251

249252
NOTE: you can also use `npm run serve` to also start a web server for development.
250253

254+
### Debug Symbols in tests.
255+
By default, tests are run against the release build `test/virtualfs.js`. As it is heavily optimized it might be hard to debug with the release lib.
256+
257+
If you want to debug the tests with more debug symbols, search for `<script src="virtualfs-debug.js"></script>` in file `test/index.html` and follow steps there.
258+
251259
## Tests in tauri
252260
Again, Test runs tests against the built artifacts in dist folder.
253261
To develop tests in tauri, run the following commands:
254262
1. First, build the artifacts in the `dist` folder by running:
255263

256264
```bash
257-
npm run build:dev
265+
npm run build
258266
```
259267

260268
2. Next, initiate the tests by executing:

0 commit comments

Comments
 (0)