Skip to content

Commit 9ec0443

Browse files
authored
chore: separate hanwritten and generated files in web-playground (vectordotdev#17871)
<!-- **Your PR title must conform to the conventional commit spec!** <type>(<scope>)!: <description> * `type` = chore, enhancement, feat, fix, docs * `!` = OPTIONAL: signals a breaking change * `scope` = Optional when `type` is "chore" or "docs", available scopes https://github.com/vectordotdev/vector/blob/master/.github/semantic.yml#L20 * `description` = short description of the change Examples: * enhancement(file source): Add `sort` option to sort discovered files * feat(new source): Initial `statsd` source * fix(file source): Fix a bug discovering new files * chore(external docs): Clarify `batch_size` option --> closes: vectordotdev#17827 I went with the simplest solution since we might do a major overhaul later. It should be good enough for now.
1 parent 7e6495c commit 9ec0443

File tree

5 files changed

+4
-151
lines changed

5 files changed

+4
-151
lines changed

lib/vector-vrl/web-playground/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cargo install --locked --version 0.10.3 wasm-pack
1919
After installing `wasm-pack` we must compile our project by running:
2020

2121
```shell
22-
wasm-pack build --target web --out-dir public
22+
wasm-pack build --target web --out-dir public/pkg
2323
```
2424

2525
Notice the `public` directory was populated with `.wasm`, and `.js`,
@@ -41,6 +41,7 @@ the web browser console.
4141
To see this in action we host `index.html` locally, for example by running:
4242

4343
```shell
44+
cd public
4445
python3 -m http.server
4546
```
4647

lib/vector-vrl/web-playground/netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
publish = "public/"
1212

1313
# Default build command.
14-
command = "bash ../../../scripts/ensure-wasm-pack-installed.sh && wasm-pack build --target web --out-dir public"
14+
command = "bash ../../../scripts/ensure-wasm-pack-installed.sh && wasm-pack build --target web --out-dir public/pkg"
1515

1616
# Ignore everything except the base directory and changes to vector/lib/
1717
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../../lib"

lib/vector-vrl/web-playground/public/.gitignore

-1
This file was deleted.

lib/vector-vrl/web-playground/public/README.md

-147
This file was deleted.

lib/vector-vrl/web-playground/public/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import init, { run_vrl } from "./vector_vrl_web_playground.js";
1+
import init, { run_vrl } from "./pkg/vector_vrl_web_playground.js";
22
import { vrlLanguageDefinition, vrlThemeDefinition } from "./vrl-highlighter.js";
33

44
const PROGRAM_EDITOR_DEFAULT_VALUE = `# Remove some fields

0 commit comments

Comments
 (0)