-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
165 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Import Aspect bazelrc presets | ||
try-import %workspace%/../../.aspect/bazelrc/bazel7.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/convenience.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/correctness.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/debug.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/javascript.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/performance.bazelrc | ||
|
||
### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.bazelversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
load("@aspect_rules_swc//swc:defs.bzl", "swc") | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
|
||
swc( | ||
name = "compile", | ||
srcs = [ | ||
"a.ts", | ||
"b.ts", | ||
], | ||
) | ||
|
||
swc( | ||
name = "compile_emit_dts", | ||
srcs = [ | ||
"a.ts", | ||
"b.ts", | ||
], | ||
experimental_emit_isolated_dts = True, | ||
) | ||
|
||
build_test( | ||
name = "test", | ||
targets = [ | ||
":compile", | ||
":compile_emit_dts", | ||
"a.js", | ||
"b.js", | ||
"a.d.ts", | ||
"b.d.ts", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
bazel_dep(name = "aspect_rules_swc", version = "0.0.0", dev_dependency = True) | ||
local_path_override( | ||
module_name = "aspect_rules_swc", | ||
path = "../..", | ||
) | ||
|
||
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) | ||
|
||
# Optional: specify a custom swc toolchain instead of the default | ||
swc = use_extension("@aspect_rules_swc//swc:extensions.bzl", "swc", dev_dependency = True) | ||
swc.toolchain( | ||
name = "swc", | ||
swc_version = "v1.6.6", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Override http_archive for local testing | ||
local_repository( | ||
name = "aspect_rules_swc", | ||
path = "../..", | ||
) | ||
|
||
#---SNIP--- Below here is re-used in the snippet published on releases | ||
|
||
################### | ||
# rules_swc setup # | ||
################### | ||
|
||
# Fetches the rules_swc dependencies. | ||
# If you want to have a different version of some dependency, | ||
# you should fetch it *before* calling this. | ||
# Alternatively, you can skip calling this function, so long as you've | ||
# already fetched all the dependencies. | ||
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies") | ||
|
||
rules_swc_dependencies() | ||
|
||
# Fetches a SWC cli from | ||
# https://github.com/swc-project/swc/releases | ||
# If you'd rather compile it from source, you can use rules_rust, fetch the project, | ||
# then register the toolchain yourself. (Note, this is not yet documented) | ||
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains") | ||
|
||
swc_register_toolchains( | ||
name = "swc", | ||
swc_version = "v1.6.6", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file replaces `WORKSPACE.bazel` when --enable_bzlmod is set. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const A = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { A } from "./a"; | ||
|
||
export const B: typeof A = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters