-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
19 changed files
with
113 additions
and
1 deletion.
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,3 @@ | ||
[ | ||
".Service" | ||
] |
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,11 @@ | ||
//wails:include js/test.js | ||
//wails:include **:js/test_all.js | ||
//wails:include *c:js/test_c.js | ||
//wails:include *i:js/test_i.js | ||
//wails:include j*:js/test_j.js | ||
//wails:include jc:js/test_jc.js | ||
//wails:include ji:js/test_ji.js | ||
//wails:include t*:js/test_t.ts | ||
//wails:include tc:js/test_tc.ts | ||
//wails:include ti:js/test_ti.ts | ||
package main |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("everywhere"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("everywhere again"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("Classes"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("Interfaces"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("JS"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("JS Classes"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("JS Interfaces"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("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,3 @@ | ||
import { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("TS Classes"); |
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 { CustomMethod } from "./service.js"; | ||
|
||
CustomMethod("TS Interfaces"); |
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,51 @@ | ||
//wails:inject console.log("Hello everywhere!"); | ||
//wails:inject **:console.log("Hello everywhere again!"); | ||
//wails:inject *c:console.log("Hello Classes!"); | ||
//wails:inject *i:console.log("Hello Interfaces!"); | ||
//wails:inject j*:console.log("Hello JS!"); | ||
//wails:inject jc:console.log("Hello JS Classes!"); | ||
//wails:inject ji:console.log("Hello JS Interfaces!"); | ||
//wails:inject t*:console.log("Hello TS!"); | ||
//wails:inject tc:console.log("Hello TS Classes!"); | ||
//wails:inject ti:console.log("Hello TS Interfaces!"); | ||
package main | ||
|
||
import ( | ||
_ "embed" | ||
"log" | ||
|
||
"github.com/wailsapp/wails/v3/internal/generator/testcases/directives/otherpackage" | ||
"github.com/wailsapp/wails/v3/pkg/application" | ||
) | ||
|
||
//wails:inject j*:/** | ||
//wails:inject j*: * @param {string} arg | ||
//wails:inject j*: * @returns {Promise<void>} | ||
//wails:inject j*: */ | ||
//wails:inject j*:export async function CustomMethod(arg) { | ||
//wails:inject t*:export async function CustomMethod(arg: string): Promise<void> { | ||
//wails:inject await InternalMethod("Hello " + arg + "!"); | ||
//wails:inject } | ||
type Service struct{} | ||
|
||
func (*Service) VisibleMethod(otherpackage.Dummy) {} | ||
|
||
//wails:internal | ||
func (*Service) InternalMethod(string) {} | ||
|
||
func main() { | ||
app := application.New(application.Options{ | ||
Services: []application.Service{ | ||
application.NewService(&Service{}), | ||
}, | ||
}) | ||
|
||
app.NewWebviewWindow() | ||
|
||
err := app.Run() | ||
|
||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
v3/internal/generator/testcases/directives/otherpackage/dummy.go
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,5 @@ | ||
//wails:include jc:js/*_j*.js | ||
//wails:include tc:js/*_t*.ts | ||
package otherpackage | ||
|
||
type Dummy struct{} |
3 changes: 3 additions & 0 deletions
3
v3/internal/generator/testcases/directives/otherpackage/js/test_j.js
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 { CustomMethod } from "../service.js"; | ||
|
||
CustomMethod("JS"); |
3 changes: 3 additions & 0 deletions
3
v3/internal/generator/testcases/directives/otherpackage/js/test_jc.js
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 { CustomMethod } from "../service.js"; | ||
|
||
CustomMethod("JS Classes"); |
3 changes: 3 additions & 0 deletions
3
v3/internal/generator/testcases/directives/otherpackage/js/test_t.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,3 @@ | ||
import { CustomMethod } from "../service.js"; | ||
|
||
CustomMethod("TS"); |
3 changes: 3 additions & 0 deletions
3
v3/internal/generator/testcases/directives/otherpackage/js/test_tc.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,3 @@ | ||
import { CustomMethod } from "../service.js"; | ||
|
||
CustomMethod("TS Classes"); |
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