Skip to content

Commit

Permalink
refactor: move extensions/* to frontend/* (#2585)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas authored Sep 3, 2024
1 parent 892d950 commit 27a8d76
Show file tree
Hide file tree
Showing 41 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
- name: VSCode extension pnpm install
run: just pnpm-install
- name: VSCode extension lint
working-directory: extensions/vscode
working-directory: frontend/vscode
run: pnpm run lint
- name: VSCode extension pnpm build and package
run: just package-extension
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ jobs:
set -euo pipefail
version="$(git describe --tags --abbrev=0 | sed 's/^v//')"
echo "Publishing version $version"
jq --arg version "$version" '.version = $version' extensions/vscode/package.json > extensions/vscode/package.json.tmp
mv extensions/vscode/package.json.tmp extensions/vscode/package.json
jq --arg version "$version" '.version = $version' frontend/vscode/package.json > frontend/vscode/package.json.tmp
mv frontend/vscode/package.json.tmp frontend/vscode/package.json
just publish-extension
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ This will automatically create a migration file in `backend/controller/sql/schem

## VSCode extension

The preferred way to develop the FTL VSCode extension is to open a VSCode instance in the `extensions/vscode` directory. This will load the extension in a new VSCode window. From there, the `launch.json` and `tasks.json` files are configured to run the extension in a new window.
The preferred way to develop the FTL VSCode extension is to open a VSCode instance in the `frontend/vscode` directory. This will load the extension in a new VSCode window. From there, the `launch.json` and `tasks.json` files are configured to run the extension in a new window.

### Building the extension

Expand All @@ -174,7 +174,7 @@ To package the extension, run:
just package-extension
```

This will create a `.vsix` file in the `extensions/vscode` directory.
This will create a `.vsix` file in the `frontend/vscode` directory.

### Publishing the extension

Expand Down
12 changes: 6 additions & 6 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCHEMA_OUT := "backend/protos/xyz/block/ftl/v1/schema/schema.proto"
ZIP_DIRS := "go-runtime/compile/build-template go-runtime/compile/external-module-template go-runtime/compile/main-work-template internal/projectinit/scaffolding go-runtime/scaffolding jvm-runtime/java/scaffolding jvm-runtime/kotlin/scaffolding"
CONSOLE_ROOT := "frontend/console"
FRONTEND_OUT := "{{CONSOLE_ROOT}}/dist/index.html"
EXTENSION_OUT := "extensions/vscode/dist/extension.js"
EXTENSION_OUT := "frontend/vscode/dist/extension.js"
PROTOS_IN := "backend/protos/xyz/block/ftl/v1/schema/schema.proto backend/protos/xyz/block/ftl/v1/console/console.proto backend/protos/xyz/block/ftl/v1/ftl.proto backend/protos/xyz/block/ftl/v1/schema/runtime.proto"
PROTOS_OUT := "backend/protos/xyz/block/ftl/v1/console/console.pb.go backend/protos/xyz/block/ftl/v1/ftl.pb.go backend/protos/xyz/block/ftl/v1/schema/runtime.pb.go backend/protos/xyz/block/ftl/v1/schema/schema.pb.go {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/console/console_pb.ts {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/ftl_pb.ts {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts"

Expand Down Expand Up @@ -88,22 +88,22 @@ build-frontend: pnpm-install

# Rebuild VSCode extension
build-extension: pnpm-install
@mk {{EXTENSION_OUT}} : extensions/vscode/src extensions/vscode/package.json -- "cd extensions/vscode && rm -f ftl-*.vsix && pnpm run compile"
@mk {{EXTENSION_OUT}} : frontend/vscode/src frontend/vscode/package.json -- "cd frontend/vscode && rm -f ftl-*.vsix && pnpm run compile"

# Install development version of VSCode extension
install-extension: build-extension
@cd extensions/vscode && vsce package && code --install-extension ftl-*.vsix
@cd frontend/vscode && vsce package && code --install-extension ftl-*.vsix

# Build and package the VSCode extension
package-extension: build-extension
@cd extensions/vscode && vsce package --no-dependencies
@cd frontend/vscode && vsce package --no-dependencies

# Publish the VSCode extension
publish-extension: package-extension
@cd extensions/vscode && vsce publish --no-dependencies
@cd frontend/vscode && vsce publish --no-dependencies

build-intellij-plugin:
@cd extensions/intellij && gradle buildPlugin
@cd frontend/intellij && gradle buildPlugin

# Kotlin runtime is temporarily disabled; these instructions create a dummy zip in place of the kotlin runtime jar for
# the runner.
Expand Down
2 changes: 1 addition & 1 deletion bin/hermit.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ env = {
"OTEL_GRPC_PORT": "4317",
"OTEL_HTTP_PORT": "4318",
"OTEL_METRIC_EXPORT_INTERVAL": "5000",
"PATH": "${HERMIT_ENV}/scripts:${HERMIT_ENV}/frontend/console/node_modules/.bin:${HERMIT_ENV}/extensions/vscode/node_modules/.bin:${PATH}",
"PATH": "${HERMIT_ENV}/scripts:${HERMIT_ENV}/frontend/console/node_modules/.bin:${HERMIT_ENV}/frontend/vscode/node_modules/.bin:${PATH}",
}
sources = ["env:///bin/packages", "https://github.com/cashapp/hermit-packages.git"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- "frontend/console"
- "extensions/vscode"
- "frontend/vscode"

0 comments on commit 27a8d76

Please sign in to comment.