From a444e271a7c3ad819be5da45fdc4a1880081eb54 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 27 Sep 2023 18:13:00 -0700 Subject: [PATCH] chore: vue example redirect --- vue/.aspect/bazelrc/.gitignore | 1 - vue/.aspect/bazelrc/BUILD.bazel | 15 - vue/.aspect/bazelrc/bazel6.bazelrc | 15 - vue/.aspect/bazelrc/convenience.bazelrc | 28 - vue/.aspect/bazelrc/correctness.bazelrc | 62 - vue/.aspect/bazelrc/debug.bazelrc | 19 - vue/.aspect/bazelrc/javascript.bazelrc | 28 - vue/.aspect/bazelrc/performance.bazelrc | 38 - vue/.bazelignore | 2 - vue/.bazeliskrc | 1 - vue/.bazelrc | 26 - vue/.bazelversion | 1 - vue/.gitignore | 29 - vue/.npmrc | 6 - vue/.vscode/extensions.json | 3 - vue/BUILD.bazel | 56 - vue/MODULE.bazel | 15 - vue/README.md | 24 +- vue/WORKSPACE.bazel | 1 - vue/env.d.ts | 1 - vue/index.html | 13 - vue/libraries/simple/BUILD.bazel | 58 - vue/libraries/simple/README.md | 4 - vue/libraries/simple/package.json | 22 - vue/libraries/simple/src/InputText.vue | 9 - vue/libraries/simple/src/InputTextarea.vue | 8 - vue/libraries/simple/src/components.ts | 4 - vue/libraries/simple/src/index.ts | 12 - vue/libraries/simple/tsconfig.json | 27 - vue/libraries/simple/vite.config.ts | 28 - vue/package.json | 36 - vue/pnpm-lock.yaml | 1726 ----------------- vue/pnpm-workspace.yaml | 2 - vue/public/favicon.ico | Bin 4286 -> 0 bytes vue/src/App.vue | 126 -- vue/src/BUILD.bazel | 18 - vue/src/assets/base.css | 75 - vue/src/assets/logo.svg | 1 - vue/src/components/HelloWorld.vue | 44 - vue/src/components/TheWelcome.vue | 91 - vue/src/components/WelcomeItem.vue | 86 - vue/src/components/icons/IconCommunity.vue | 12 - .../components/icons/IconDocumentation.vue | 12 - vue/src/components/icons/IconEcosystem.vue | 12 - vue/src/components/icons/IconSupport.vue | 12 - vue/src/components/icons/IconTooling.vue | 19 - vue/src/main.ts | 10 - vue/src/router/index.ts | 23 - vue/src/views/AboutView.vue | 15 - vue/src/views/HomeView.vue | 9 - vue/tsconfig.config.json | 8 - vue/tsconfig.json | 17 - vue/vite.config.ts | 16 - 53 files changed, 2 insertions(+), 2924 deletions(-) delete mode 100644 vue/.aspect/bazelrc/.gitignore delete mode 100644 vue/.aspect/bazelrc/BUILD.bazel delete mode 100644 vue/.aspect/bazelrc/bazel6.bazelrc delete mode 100644 vue/.aspect/bazelrc/convenience.bazelrc delete mode 100644 vue/.aspect/bazelrc/correctness.bazelrc delete mode 100644 vue/.aspect/bazelrc/debug.bazelrc delete mode 100644 vue/.aspect/bazelrc/javascript.bazelrc delete mode 100644 vue/.aspect/bazelrc/performance.bazelrc delete mode 100644 vue/.bazelignore delete mode 120000 vue/.bazeliskrc delete mode 100644 vue/.bazelrc delete mode 120000 vue/.bazelversion delete mode 100644 vue/.gitignore delete mode 100644 vue/.npmrc delete mode 100644 vue/.vscode/extensions.json delete mode 100644 vue/BUILD.bazel delete mode 100644 vue/MODULE.bazel delete mode 100644 vue/WORKSPACE.bazel delete mode 100644 vue/env.d.ts delete mode 100644 vue/index.html delete mode 100644 vue/libraries/simple/BUILD.bazel delete mode 100644 vue/libraries/simple/README.md delete mode 100644 vue/libraries/simple/package.json delete mode 100644 vue/libraries/simple/src/InputText.vue delete mode 100644 vue/libraries/simple/src/InputTextarea.vue delete mode 100644 vue/libraries/simple/src/components.ts delete mode 100644 vue/libraries/simple/src/index.ts delete mode 100644 vue/libraries/simple/tsconfig.json delete mode 100644 vue/libraries/simple/vite.config.ts delete mode 100644 vue/package.json delete mode 100644 vue/pnpm-lock.yaml delete mode 100644 vue/pnpm-workspace.yaml delete mode 100644 vue/public/favicon.ico delete mode 100644 vue/src/App.vue delete mode 100644 vue/src/BUILD.bazel delete mode 100644 vue/src/assets/base.css delete mode 100644 vue/src/assets/logo.svg delete mode 100644 vue/src/components/HelloWorld.vue delete mode 100644 vue/src/components/TheWelcome.vue delete mode 100644 vue/src/components/WelcomeItem.vue delete mode 100644 vue/src/components/icons/IconCommunity.vue delete mode 100644 vue/src/components/icons/IconDocumentation.vue delete mode 100644 vue/src/components/icons/IconEcosystem.vue delete mode 100644 vue/src/components/icons/IconSupport.vue delete mode 100644 vue/src/components/icons/IconTooling.vue delete mode 100644 vue/src/main.ts delete mode 100644 vue/src/router/index.ts delete mode 100644 vue/src/views/AboutView.vue delete mode 100644 vue/src/views/HomeView.vue delete mode 100644 vue/tsconfig.config.json delete mode 100644 vue/tsconfig.json delete mode 100644 vue/vite.config.ts diff --git a/vue/.aspect/bazelrc/.gitignore b/vue/.aspect/bazelrc/.gitignore deleted file mode 100644 index 74824b01..00000000 --- a/vue/.aspect/bazelrc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -user.bazelrc diff --git a/vue/.aspect/bazelrc/BUILD.bazel b/vue/.aspect/bazelrc/BUILD.bazel deleted file mode 100644 index 434f376a..00000000 --- a/vue/.aspect/bazelrc/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -"Aspect bazelrc presets; see https://docs.aspect.build/guides/bazelrc" - -load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") - -write_aspect_bazelrc_presets( - name = "update_aspect_bazelrc_presets", - presets = [ - "bazel6", - "convenience", - "correctness", - "debug", - "javascript", - "performance", - ], -) diff --git a/vue/.aspect/bazelrc/bazel6.bazelrc b/vue/.aspect/bazelrc/bazel6.bazelrc deleted file mode 100644 index 11a1c67f..00000000 --- a/vue/.aspect/bazelrc/bazel6.bazelrc +++ /dev/null @@ -1,15 +0,0 @@ -# Speed up all builds by not checking if external repository files have been modified. -# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/bazel/repository/RepositoryOptions.java#L244 -build --noexperimental_check_external_repository_files -fetch --noexperimental_check_external_repository_files -query --noexperimental_check_external_repository_files - -# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. -# Save time on Sandbox creation and deletion when many of the same kind of action run during the -# build. -# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories -build --reuse_sandbox_directories - -# Avoid this flag being enabled by remote_download_minimal or remote_download_toplevel -# See https://meroton.com/blog/bazel-6-errors-build-without-the-bytes/ -build --noexperimental_action_cache_store_output_metadata diff --git a/vue/.aspect/bazelrc/convenience.bazelrc b/vue/.aspect/bazelrc/convenience.bazelrc deleted file mode 100644 index c674569f..00000000 --- a/vue/.aspect/bazelrc/convenience.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# Attempt to build & test every target whose prerequisites were successfully built. -# Docs: https://bazel.build/docs/user-manual#keep-going -build --keep_going - -# Output test errors to stderr so users don't have to `cat` or open test failure log files when test -# fail. This makes the log noiser in exchange for reducing the time-to-feedback on test failures for -# users. -# Docs: https://bazel.build/docs/user-manual#test-output -test --test_output=errors - -# Show the output files created by builds that requested more than one target. This helps users -# locate the build outputs in more cases -# Docs: https://bazel.build/docs/user-manual#show-result -build --show_result=20 - -# Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is -# Linux and you run bazel build, Bazel picks up lines starting with build:linux. Supported OS -# identifiers are `linux`, `macos`, `windows`, `freebsd`, and `openbsd`. Enabling this flag is -# equivalent to using `--config=linux` on Linux, `--config=windows` on Windows, etc. -# Docs: https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config -common --enable_platform_specific_config - -# Output a heap dump if an OOM is thrown during a Bazel invocation -# (including OOMs due to `--experimental_oom_more_eagerly_threshold`). -# The dump will be written to `/.heapdump.hprof`. -# You may need to configure CI to capture this artifact and upload for later use. -# Docs: https://bazel.build/reference/command-line-reference#flag--heap_dump_on_oom -common --heap_dump_on_oom diff --git a/vue/.aspect/bazelrc/correctness.bazelrc b/vue/.aspect/bazelrc/correctness.bazelrc deleted file mode 100644 index 56fad5fd..00000000 --- a/vue/.aspect/bazelrc/correctness.bazelrc +++ /dev/null @@ -1,62 +0,0 @@ -# Do not upload locally executed action results to the remote cache. -# This should be the default for local builds so local builds cannot poison the remote cache. -# It should be flipped to `--remote_upload_local_results` on CI -# by using `--bazelrc=.aspect/bazelrc/ci.bazelrc`. -# Docs: https://bazel.build/reference/command-line-reference#flag--remote_upload_local_results -build --noremote_upload_local_results - -# Don't allow network access for build actions in the sandbox. -# Ensures that you don't accidentally make non-hermetic actions/tests which depend on remote -# services. -# Developers should tag targets with `tags=["requires-network"]` to opt-out of the enforcement. -# Docs: https://bazel.build/reference/command-line-reference#flag--sandbox_default_allow_network -build --sandbox_default_allow_network=false - -# Warn if a test's timeout is significantly longer than the test's actual execution time. -# Bazel's default for test_timeout is medium (5 min), but most tests should instead be short (1 min). -# While a test's timeout should be set such that it is not flaky, a test that has a highly -# over-generous timeout can hide real problems that crop up unexpectedly. -# For instance, a test that normally executes in a minute or two should not have a timeout of -# ETERNAL or LONG as these are much, much too generous. -# Docs: https://bazel.build/docs/user-manual#test-verbose-timeout-warnings -test --test_verbose_timeout_warnings - -# Allow the Bazel server to check directory sources for changes. Ensures that the Bazel server -# notices when a directory changes, if you have a directory listed in the srcs of some target. -# Recommended when using -# [copy_directory](https://github.com/aspect-build/bazel-lib/blob/main/docs/copy_directory.md) and -# [rules_js](https://github.com/aspect-build/rules_js) since npm package are source directories -# inputs to copy_directory actions. -# Docs: https://bazel.build/reference/command-line-reference#flag--host_jvm_args -startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 - -# Allow exclusive tests to run in the sandbox. Fixes a bug where Bazel doesn't enable sandboxing for -# tests with `tags=["exclusive"]`. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_exclusive_test_sandboxed -test --incompatible_exclusive_test_sandboxed - -# Use a static value for `PATH` and does not inherit `LD_LIBRARY_PATH`. Doesn't let environment -# variables like `PATH` sneak into the build, which can cause massive cache misses when they change. -# Use `--action_env=ENV_VARIABLE` if you want to inherit specific environment variables from the -# client, but note that doing so can prevent cross-user caching if a shared cache is used. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_strict_action_env -build --incompatible_strict_action_env - -# Propagate tags from a target declaration to the actions' execution requirements. -# Ensures that tags applied in your BUILD file, like `tags=["no-remote"]` -# get propagated to actions created by the rule. -# Without this option, you rely on rules authors to manually check the tags you passed -# and apply relevant ones to the actions they create. -# See https://github.com/bazelbuild/bazel/issues/8830 for details. -# Docs: https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation -build --experimental_allow_tags_propagation -fetch --experimental_allow_tags_propagation -query --experimental_allow_tags_propagation - -# Do not automatically create `__init__.py` files in the runfiles of Python targets. Fixes the wrong -# default that comes from Google's internal monorepo by using `__init__.py` to delimit a Python -# package. Precisely, when a `py_binary` or `py_test` target has `legacy_create_init` set to `auto (the -# default), it is treated as false if and only if this flag is set. See -# https://github.com/bazelbuild/bazel/issues/10076. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py -build --incompatible_default_to_explicit_init_py diff --git a/vue/.aspect/bazelrc/debug.bazelrc b/vue/.aspect/bazelrc/debug.bazelrc deleted file mode 100644 index bfb0bdd4..00000000 --- a/vue/.aspect/bazelrc/debug.bazelrc +++ /dev/null @@ -1,19 +0,0 @@ -############################################################ -# Use `bazel test --config=debug` to enable these settings # -############################################################ - -# Stream stdout/stderr output from each test in real-time. -# Docs: https://bazel.build/docs/user-manual#test-output -test:debug --test_output=streamed - -# Run one test at a time. -# Docs: https://bazel.build/reference/command-line-reference#flag--test_strategy -test:debug --test_strategy=exclusive - -# Prevent long running tests from timing out. -# Docs: https://bazel.build/docs/user-manual#test-timeout -test:debug --test_timeout=9999 - -# Always run tests even if they have cached results. -# Docs: https://bazel.build/docs/user-manual#cache-test-results -test:debug --nocache_test_results diff --git a/vue/.aspect/bazelrc/javascript.bazelrc b/vue/.aspect/bazelrc/javascript.bazelrc deleted file mode 100644 index dc768641..00000000 --- a/vue/.aspect/bazelrc/javascript.bazelrc +++ /dev/null @@ -1,28 +0,0 @@ -# Aspect recommended Bazel flags when using Aspect's JavaScript rules: https://github.com/aspect-build/rules_js -# Docs for Node.js flags: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options - -# Support for debugging Node.js tests. Use bazel run with `--config=debug` to turn on the NodeJS -# inspector agent. The node process will break before user code starts and wait for the debugger to -# connect. Pass the --inspect-brk option to all tests which enables the node inspector agent. See -# https://nodejs.org/de/docs/guides/debugging-getting-started/#command-line-options for more -# details. -# Docs: https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options -run:debug -- --node_options=--inspect-brk - -# Enable runfiles on all platforms. Runfiles are on by default on Linux and MacOS but off on -# Windows. -# -# In general, rules_js and derivate rule sets assume that runfiles are enabled and do not support no -# runfiles case because it does not scale to teach all Node.js tools to use the runfiles manifest. -# -# If you are developing on Windows, you must either run bazel with administrator privileges or -# enable developer mode. If you do not you may hit this error on Windows: -# -# Bazel needs to create symlinks to build the runfiles tree. -# Creating symlinks on Windows requires one of the following: -# 1. Bazel is run with administrator privileges. -# 2. The system version is Windows 10 Creators Update (1703) or later -# and developer mode is enabled. -# -# Docs: https://bazel.build/reference/command-line-reference#flag--enable_runfiles -build --enable_runfiles diff --git a/vue/.aspect/bazelrc/performance.bazelrc b/vue/.aspect/bazelrc/performance.bazelrc deleted file mode 100644 index fff4c7c5..00000000 --- a/vue/.aspect/bazelrc/performance.bazelrc +++ /dev/null @@ -1,38 +0,0 @@ -# Speed up all builds by not checking if output files have been modified. Lets you make changes to -# the output tree without triggering a build for local debugging. For example, you can modify -# [rules_js](https://github.com/aspect-build/rules_js) 3rd party npm packages in the output tree -# when local debugging. -# Docs: https://github.com/bazelbuild/bazel/blob/1af61b21df99edc2fc66939cdf14449c2661f873/src/main/java/com/google/devtools/build/lib/pkgcache/PackageOptions.java#L185 -build --noexperimental_check_output_files -fetch --noexperimental_check_output_files -query --noexperimental_check_output_files - -# Don't apply `--noremote_upload_local_results` and `--noremote_accept_cached` to the disk cache. -# If you have both `--noremote_upload_local_results` and `--disk_cache`, then this fixes a bug where -# Bazel doesn't write to the local disk cache as it treats as a remote cache. -# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_remote_results_ignore_disk -build --incompatible_remote_results_ignore_disk - -# Directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs. -# Save time on Sandbox creation and deletion when many of the same kind of action run during the -# build. -# No longer experimental in Bazel 6: https://github.com/bazelbuild/bazel/commit/c1a95501a5611878e5cc43a3cc531f2b9e47835b -# Docs: https://bazel.build/reference/command-line-reference#flag--reuse_sandbox_directories -build --experimental_reuse_sandbox_directories - -# Do not build runfiles symlink forests for external repositories under -# `.runfiles/wsname/external/repo` (in addition to `.runfiles/repo`). This reduces runfiles & -# sandbox creation times & prevents accidentally depending on this feature which may flip to off by -# default in the future. Note, some rules may fail under this flag, please file issues with the rule -# author. -# Docs: https://bazel.build/reference/command-line-reference#flag--legacy_external_runfiles -build --nolegacy_external_runfiles - -# Some actions are always IO-intensive but require little compute. It's wasteful to put the output -# in the remote cache, it just saturates the network and fills the cache storage causing earlier -# evictions. It's also not worth sending them for remote execution. -# For actions like PackageTar it's usually faster to just re-run the work locally every time. -# You'll have to look at an execution log to figure out what other action mnemonics you care about. -# In some cases you may need to patch rulesets to add a mnemonic to actions that don't have one. -# https://bazel.build/reference/command-line-reference#flag--modify_execution_info -build --modify_execution_info=PackageTar=+no-remote diff --git a/vue/.bazelignore b/vue/.bazelignore deleted file mode 100644 index ecabd313..00000000 --- a/vue/.bazelignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -libraries/simple/node_modules diff --git a/vue/.bazeliskrc b/vue/.bazeliskrc deleted file mode 120000 index 270b9ce4..00000000 --- a/vue/.bazeliskrc +++ /dev/null @@ -1 +0,0 @@ -../bazelrc/.bazeliskrc \ No newline at end of file diff --git a/vue/.bazelrc b/vue/.bazelrc deleted file mode 100644 index 23a572da..00000000 --- a/vue/.bazelrc +++ /dev/null @@ -1,26 +0,0 @@ -# Import Aspect recommended Bazel convenience settings for all projects -import %workspace%/.aspect/bazelrc/convenience.bazelrc - -# Import Aspect recommended Bazel correctness settings for all projects -import %workspace%/.aspect/bazelrc/correctness.bazelrc - -# Import Aspect recommended Bazel performance settings for all projects -import %workspace%/.aspect/bazelrc/performance.bazelrc - -# Import Aspect recommended Bazel debug settings for all projects -import %workspace%/.aspect/bazelrc/debug.bazelrc - -# Import Aspect recommended Bazel javascript settings for all projects -import %workspace%/.aspect/bazelrc/javascript.bazelrc - -# Import Aspect recommended Bazel 6 settings for all projects -import %workspace%/.aspect/bazelrc/bazel6.bazelrc - -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### -common --enable_bzlmod - -# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. -# This file should appear in `.gitignore` so that settings are not shared with team members. This -# should be last statement in this config so the user configuration is able to overwrite flags from -# this file. See https://bazel.build/configure/best-practices#bazelrc-file. -try-import %workspace%/.aspect/bazelrc/user.bazelrc diff --git a/vue/.bazelversion b/vue/.bazelversion deleted file mode 120000 index af130ee0..00000000 --- a/vue/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -../bazelrc/.bazelversion \ No newline at end of file diff --git a/vue/.gitignore b/vue/.gitignore deleted file mode 100644 index 8b4caccc..00000000 --- a/vue/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -node_modules -/bazel-* - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* -.DS_Store -dist -dist-ssr -coverage -*.local - -/cypress/videos/ -/cypress/screenshots/ - -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/vue/.npmrc b/vue/.npmrc deleted file mode 100644 index e1585088..00000000 --- a/vue/.npmrc +++ /dev/null @@ -1,6 +0,0 @@ -# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on -# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what -# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules). See -# https://github.com/aspect-build/rules_js/blob/7377f2d0387cc2a9251137929b1c53ccdb3fbcf0/docs/npm_import.md#npm_translate_lock -# documentation for more information. -hoist=false diff --git a/vue/.vscode/extensions.json b/vue/.vscode/extensions.json deleted file mode 100644 index c0a6e5a4..00000000 --- a/vue/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] -} diff --git a/vue/BUILD.bazel b/vue/BUILD.bazel deleted file mode 100644 index e3aa231c..00000000 --- a/vue/BUILD.bazel +++ /dev/null @@ -1,56 +0,0 @@ -load("@npm//:defs.bzl", "npm_link_all_packages") -load("@npm//:vite/package_json.bzl", vite_bin = "bin") -load("@npm//:vue-tsc/package_json.bzl", vue_tsc_bin = "bin") - -# TODO: add unit tests instead of only testing building -load("@bazel_skylib//rules:build_test.bzl", "build_test") - -# This macro expands to a link_npm_package for each third-party package in package.json -npm_link_all_packages(name = "node_modules") - -SRCS = [ - "env.d.ts", - "index.html", - "package.json", - "vite.config.ts", - "tsconfig.json", - "tsconfig.config.json", - "//src", -] - -BUILD_DEPS = [":node_modules/" + d for d in [ - "@yourname/yourlibrary", - "@vitejs/plugin-vue", - "@vitejs/plugin-vue-jsx", - "@vue/tsconfig", - "vite", - "vue", - "vue-router", -]] - -vite_bin.vite( - name = "build", - args = ["build"], - out_dirs = ["dist"], - srcs = SRCS + BUILD_DEPS, -) - -vue_tsc_bin.vue_tsc_test( - name = "type-check", - args = ["--noEmit"], - include_declarations = True, - data = SRCS + BUILD_DEPS, -) - -vite_bin.vite_binary( - name = "vite", - data = SRCS + BUILD_DEPS, -) - -build_test( - name = "build_test", - targets = [ - ":build", - ":type-check", - ], -) diff --git a/vue/MODULE.bazel b/vue/MODULE.bazel deleted file mode 100644 index 8ace5370..00000000 --- a/vue/MODULE.bazel +++ /dev/null @@ -1,15 +0,0 @@ -bazel_dep(name = "aspect_bazel_lib", version = "1.33.0") -bazel_dep(name = "aspect_rules_js", version = "1.31.0") -bazel_dep(name = "aspect_rules_rollup", version = "1.0.0") -bazel_dep(name = "bazel_skylib", version = "1.4.2") - -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True) - -npm.npm_translate_lock( - name = "npm", - npmrc = "//:.npmrc", - pnpm_lock = "//:pnpm-lock.yaml", - verify_node_modules_ignored = "//:.bazelignore", -) - -use_repo(npm, "npm") diff --git a/vue/README.md b/vue/README.md index b22d1c02..67407d43 100644 --- a/vue/README.md +++ b/vue/README.md @@ -1,24 +1,4 @@ # vue-project -Created by running `npm init vue@latest` following https://vuejs.org/guide/quick-start.html#local - -Then adding Bazel configuration files. - -Install local tooling: `npx pnpm i` - -Devmode: `npm run dev` - -Typecheck and build: `npm run build` - -Note: this project simply wraps the Vite build system with Bazel. -This doesn't provide any incrementality benefits of Bazel, because it just runs a single action -when any file changes, which calls through to Vite. -Furthermore we didn't teach Vite the ["ibazel_notify_changes protocol"](https://github.com/bazelbuild/bazel-watcher#running-a-target) so every time the code changes, the devserver restarts from scratch. - -However, Vite is a lot faster than Webpack, so at a small scale like this, this developer roundtrip is actually fine. - -Also, we show how to extract vue components as pre-built npm packages, using our pnpm workspaces support to link these into an app. -See the `libraries/` folder and the `pnpm-workspace.yaml` file. -This makes the build more incremental since those packages ("component libraries") are not be re-built every time. - -To scale up the example further, and to be more Bazel-idiomatic, the Vite composition of tools like `esbuild` and plugins like `@vitejs/plugin-vue` could be decomposed into an analogous Bazel pipeline. +MOVED: this example is now located at + diff --git a/vue/WORKSPACE.bazel b/vue/WORKSPACE.bazel deleted file mode 100644 index 9f0c4f08..00000000 --- a/vue/WORKSPACE.bazel +++ /dev/null @@ -1 +0,0 @@ -# Marker that this folder is the root of a Bazel workspace diff --git a/vue/env.d.ts b/vue/env.d.ts deleted file mode 100644 index 11f02fe2..00000000 --- a/vue/env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/vue/index.html b/vue/index.html deleted file mode 100644 index 11603f87..00000000 --- a/vue/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Vite App - - -
- - - diff --git a/vue/libraries/simple/BUILD.bazel b/vue/libraries/simple/BUILD.bazel deleted file mode 100644 index ed9453f8..00000000 --- a/vue/libraries/simple/BUILD.bazel +++ /dev/null @@ -1,58 +0,0 @@ -load("@aspect_rules_js//npm:defs.bzl", "npm_package") -load("@npm//:defs.bzl", "npm_link_all_packages") -load("@npm//:vite/package_json.bzl", vite_bin = "bin") -load("@npm//:vue-tsc/package_json.bzl", vue_tsc_bin = "bin") - -npm_link_all_packages(name = "node_modules") - -_SRCS = [ - "src/InputText.vue", - "src/InputTextarea.vue", - "src/components.ts", - "src/index.ts", -] - -vite_bin.vite( - name = "build", - args = [ - "build", - "libraries/simple", - ], - outs = ["dist/index.es.js"], - srcs = _SRCS + [ - "vite.config.ts", - "//libraries/simple:node_modules/@vitejs/plugin-vue", - ], -) - -vue_tsc_bin.vue_tsc( - name = "types", - args = [ - "--project", - "libraries/simple", - ], - srcs = _SRCS + [ - "tsconfig.json", - "//:node_modules/vite", - "//:node_modules/vue", - ], - outs = [ - "dist/types/InputText.vue.d.ts", - "dist/types/InputTextarea.vue.d.ts", - "dist/types/components.d.ts", - "dist/types/index.d.ts", - ], -) - -# TODO(alexeagle): show how this could be published to npm -npm_package( - name = "simple", - srcs = [ - "package.json", - ":build", - ":types", - ], - # This is a perf improvement; the default will be flipped to False in rules_js 2.0 - include_runfiles = False, - visibility = ["//visibility:public"], -) diff --git a/vue/libraries/simple/README.md b/vue/libraries/simple/README.md deleted file mode 100644 index 1bb96503..00000000 --- a/vue/libraries/simple/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Simple Vue Component Library - -This shows how you can build libraries in a monorepo with Bazel. - diff --git a/vue/libraries/simple/package.json b/vue/libraries/simple/package.json deleted file mode 100644 index 2bd9bbbb..00000000 --- a/vue/libraries/simple/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@yourname/yourlibrary", - "version": "0.0.1", - "files": [ - "dist/*" - ], - "types": "./dist/types/index.d.ts", - "module": "./dist/index.es.js", - "exports": { - ".": { - "import": "./dist/index.es.js" - }, - "./dist/style.css": "./dist/style.css" - }, - "peerDependencies": { - "vue": "^3.2.21" - }, - "devDependencies": { - "@vue/compiler-sfc": "3.2.37", - "@vitejs/plugin-vue": "3.2.0" - } -} diff --git a/vue/libraries/simple/src/InputText.vue b/vue/libraries/simple/src/InputText.vue deleted file mode 100644 index 6705bbc9..00000000 --- a/vue/libraries/simple/src/InputText.vue +++ /dev/null @@ -1,9 +0,0 @@ - - diff --git a/vue/libraries/simple/src/InputTextarea.vue b/vue/libraries/simple/src/InputTextarea.vue deleted file mode 100644 index 61718d48..00000000 --- a/vue/libraries/simple/src/InputTextarea.vue +++ /dev/null @@ -1,8 +0,0 @@ -