Skip to content

Commit

Permalink
馃搩 docs: Update docs for v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Apr 20, 2024
1 parent 473d05e commit cce1524
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
<dependency>
<groupId>com.caoccao.javet</groupId>
<artifactId>swc4j</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
</dependency>
```

```kotlin
// Gradle Kotlin DSL
implementation("com.caoccao.javet:swc4j:0.3.0")
implementation("com.caoccao.javet:swc4j:0.4.0")
```

```groovy
// Gradle Groovy DSL
implementation 'com.caoccao.javet:swc4j:0.3.0'
implementation 'com.caoccao.javet:swc4j:0.4.0'
```

* Run the following Java code.
Expand All @@ -46,7 +46,7 @@ implementation 'com.caoccao.javet:swc4j:0.3.0'
// Prepare a simple TypeScript code snippet.
String code = "function add(a:number, b:number) { return a+b; }";
// Prepare a script name.
String specifier = "file:///abc.ts";
URL specifier = new URL("file://abc.ts");
// Prepare an option with script name and media type.
Swc4jTranspileOptions options = new Swc4jTranspileOptions()
.setSpecifier(specifier)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_01_run_typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Swc4j swc4j = new Swc4j();
// Prepare a simple TypeScript code snippet.
String code = "function add(a:number, b:number) { return a+b; }";
// Prepare a script name.
String specifier = "file:///abc.ts";
URL specifier = new URL("file://abc.ts");
// Prepare an option with script name and media type.
Swc4jTranspileOptions options = new Swc4jTranspileOptions()
.setSpecifier(specifier)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_02_transpile_jsx.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ String code = "import React from 'react';\n" +
"}\n" +
"export default App;";
// Prepare a script name.
String specifier = "file:///abc.ts";
URL specifier = new URL("file://abc.ts");
// Prepare an option with script name and media type.
Swc4jTranspileOptions options = new Swc4jTranspileOptions()
.setSpecifier(specifier)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_03_tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ String code = "function quickSort(arr: number[]): number[] {\n" +
" return [...quickSort(leftArr), pivot, ...quickSort(rightArr)];\n" +
"}";
// Prepare a script name.
String specifier = "file:///abc.ts";
URL specifier = new URL("file://abc.ts");
// Prepare an option with script name and media type.
Swc4jTranspileOptions options = new Swc4jTranspileOptions()
.setSpecifier(specifier)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial_04_ast.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ String code = "import { Validator } from './Validator';\n" +
"\n" +
"export { EmailValidator };";
// Prepare a script name.
String specifier = "file:///abc.ts";
URL specifier = new URL("file://abc.ts");
// Prepare an option with script name and media type.
Swc4jTranspileOptions options = new Swc4jTranspileOptions()
.setSpecifier(specifier)
Expand Down
2 changes: 1 addition & 1 deletion scripts/ts/change_swc4j_version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ class ChangeSwc4jVersion {
}
}

const changeSwc4jVersion = new ChangeSwc4jVersion('0.3.0', '0.4.0');
const changeSwc4jVersion = new ChangeSwc4jVersion('0.4.0', '0.4.0');
changeSwc4jVersion.change()

0 comments on commit cce1524

Please sign in to comment.