-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't relativize paths to the swcrc location
maybe something changed upstream since that code was written? The newly added example shows it working without that. Fixes #11
- Loading branch information
1 parent
9e609b9
commit f539478
Showing
7 changed files
with
67 additions
and
11 deletions.
There are no files selected for viewing
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,23 @@ | ||
{ | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": false, | ||
"decorators": true, | ||
"dynamicImport": false | ||
}, | ||
"transform": { | ||
"legacyDecorator": true, | ||
"decoratorMetadata": true | ||
}, | ||
"target": "es2016" | ||
}, | ||
"module": { | ||
"type": "commonjs", | ||
"strict": false, | ||
"strictMode": true, | ||
"lazy": false, | ||
"noInterop": false | ||
}, | ||
"sourceMaps": true | ||
} |
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 @@ | ||
exports_files([".swcrc"]) |
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,24 @@ | ||
load("@aspect_rules_swc//swc:swc.bzl", "swc") | ||
load("@bazel_skylib//rules:diff_test.bzl", "diff_test") | ||
|
||
# Runs `swc in.ts > ../../bazel-bin/examples/simple/in.js` | ||
# You can run `bazel build --subcommands //examples/simple:transpile` | ||
# to see the exact command line Bazel runs. | ||
# Note that by default, sources are found by glob(["**/*.ts"]) | ||
swc( | ||
name = "transpile", | ||
source_maps = True, | ||
swcrc = "//examples/rc:.swcrc", | ||
) | ||
|
||
diff_test( | ||
name = "test", | ||
file1 = "in.js", | ||
file2 = "expected.js", | ||
) | ||
|
||
diff_test( | ||
name = "test_map", | ||
file1 = "in.js.map", | ||
file2 = "expected.js.map", | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
export const a: string = 'foo' |
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