-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
82061a5
commit 7e9221a
Showing
7 changed files
with
129 additions
and
43 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
import * as main from "./main"; | ||
import * as main from "./main" | ||
|
||
import { Fruit, GhostGang, ComplexObject } from "./pdk"; | ||
import { | ||
Fruit, | ||
GhostGang, | ||
ComplexObject, | ||
} from './pdk' | ||
|
||
export function voidFunc(): number { | ||
main.voidFuncImpl(); | ||
|
||
return 0; | ||
export function voidFunc(): number { | ||
main.voidFuncImpl() | ||
|
||
|
||
return 0 | ||
} | ||
|
||
export function primitiveTypeFunc(): number { | ||
const input = Host.inputString(); | ||
|
||
const output = main.primitiveTypeFuncImpl(input); | ||
|
||
Host.outputString(JSON.stringify(output)); | ||
|
||
return 0; | ||
const input = Host.inputString() | ||
const output = main.primitiveTypeFuncImpl(input) | ||
Host.outputString(JSON.stringify(output)) | ||
return 0 | ||
} | ||
|
||
export function referenceTypeFunc(): number { | ||
const input = Host.inputString() as Fruit; | ||
const input = Host.inputString() as Fruit | ||
|
||
const output = main.referenceTypeFuncImpl(input) | ||
|
||
Host.outputString(JSON.stringify(output)) | ||
|
||
return 0 | ||
} | ||
|
||
const output = main.referenceTypeFuncImpl(input); | ||
|
||
Host.outputString(JSON.stringify(output)); | ||
|
||
return 0; | ||
} |
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
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 @@ | ||
app_id = "app_1234" | ||
|
||
# This is where 'xtp plugin push' expects to find the wasm file after the build script has run. | ||
bin = "dist/plugin.wasm" | ||
extension_point_id = "ext_1234" | ||
name = "hello" | ||
|
||
[scripts] | ||
|
||
# xtp plugin build runs this script to generate the wasm file | ||
build = "npm run build" | ||
|
||
# xtp plugin init runs this script to format the code | ||
format = "npm run format" |
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 @@ | ||
app_id = "<%= project.appId %>" | ||
|
||
# This is where 'xtp plugin push' expects to find the wasm file after the build script has run. | ||
bin = "dist/plugin.wasm" | ||
extension_point_id = "<%= project.extensionPointId %>" | ||
name = "<%= project.name %>" | ||
|
||
[scripts] | ||
|
||
# xtp plugin build runs this script to generate the wasm file | ||
build = "npm run build" | ||
|
||
# xtp plugin init runs this script to format the code | ||
format = "npm run format" |