Skip to content

Commit

Permalink
chore: separate hanwritten and generated files in web-playground (#17871
Browse files Browse the repository at this point in the history
)

<!--
**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: #17827 

I went with the simplest solution since we might do a major overhaul
later. It should be good enough for now.
  • Loading branch information
pront authored Jul 5, 2023
1 parent 7e6495c commit 9ec0443
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 151 deletions.
3 changes: 2 additions & 1 deletion lib/vector-vrl/web-playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cargo install --locked --version 0.10.3 wasm-pack
After installing `wasm-pack` we must compile our project by running:

```shell
wasm-pack build --target web --out-dir public
wasm-pack build --target web --out-dir public/pkg
```

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

```shell
cd public
python3 -m http.server
```

Expand Down
2 changes: 1 addition & 1 deletion lib/vector-vrl/web-playground/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
publish = "public/"

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

# Ignore everything except the base directory and changes to vector/lib/
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../../lib"
1 change: 0 additions & 1 deletion lib/vector-vrl/web-playground/public/.gitignore

This file was deleted.

147 changes: 0 additions & 147 deletions lib/vector-vrl/web-playground/public/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion lib/vector-vrl/web-playground/public/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import init, { run_vrl } from "./vector_vrl_web_playground.js";
import init, { run_vrl } from "./pkg/vector_vrl_web_playground.js";
import { vrlLanguageDefinition, vrlThemeDefinition } from "./vrl-highlighter.js";

const PROGRAM_EDITOR_DEFAULT_VALUE = `# Remove some fields
Expand Down

0 comments on commit 9ec0443

Please sign in to comment.