-
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
2a17578
commit b58a386
Showing
9 changed files
with
152 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,6 @@ | |
# Go workspace file | ||
go.work | ||
|
||
lib.wasm | ||
gofmt.wasm | ||
*.tgz | ||
go_wasm.js | ||
gofmt.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
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,9 +1,9 @@ | ||
export type InitInput = | ||
| RequestInfo | ||
| URL | ||
| Response | ||
| BufferSource | ||
| WebAssembly.Module; | ||
| RequestInfo | ||
| URL | ||
| Response | ||
| BufferSource | ||
| WebAssembly.Module; | ||
|
||
export default function init(wasm_url?: InitInput): Promise<void>; | ||
export declare function format(input: string): string; |
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,50 +1,50 @@ | ||
{ | ||
"name": "@wasm-fmt/gofmt", | ||
"description": "A wasm based golang formatter", | ||
"author": "magic-akari <[email protected]>", | ||
"version": "0.4.0", | ||
"license": "MIT", | ||
"keywords": [ | ||
"wasm", | ||
"golang", | ||
"formatter" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wasm-fmt/gofmt" | ||
}, | ||
"homepage": "https://github.com/wasm-fmt/gofmt", | ||
"bugs": { | ||
"url": "https://github.com/wasm-fmt/gofmt/issues" | ||
}, | ||
"type": "module", | ||
"main": "lib.js", | ||
"module": "lib.js", | ||
"types": "lib.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./lib.d.ts", | ||
"default": "./lib.js" | ||
}, | ||
"./vite": { | ||
"types": "./lib.d.ts", | ||
"default": "./vite.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./*": "./*" | ||
}, | ||
"scripts": { | ||
"go_wasm": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./go_wasm.js", | ||
"patch": "git apply ./go_wasm.patch", | ||
"build": "tinygo build -o=lib.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go", | ||
"postbuild": "npm run go_wasm && npm run patch", | ||
"test": "node --test" | ||
}, | ||
"engines": { | ||
"node": ">=16.17.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": true | ||
} | ||
"name": "@wasm-fmt/gofmt", | ||
"description": "A wasm based golang formatter", | ||
"author": "magic-akari <[email protected]>", | ||
"version": "0.4.0", | ||
"license": "MIT", | ||
"keywords": [ | ||
"wasm", | ||
"golang", | ||
"formatter" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wasm-fmt/gofmt" | ||
}, | ||
"homepage": "https://github.com/wasm-fmt/gofmt", | ||
"bugs": { | ||
"url": "https://github.com/wasm-fmt/gofmt/issues" | ||
}, | ||
"type": "module", | ||
"main": "gofmt.js", | ||
"module": "gofmt.js", | ||
"types": "gofmt.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./gofmt.d.ts", | ||
"default": "./gofmt.js" | ||
}, | ||
"./vite": { | ||
"types": "./gofmt.d.ts", | ||
"default": "./vite.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./*": "./*" | ||
}, | ||
"scripts": { | ||
"gofmt": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./gofmt.js", | ||
"patch": "git apply ./gofmt.patch", | ||
"build": "tinygo build -o=gofmt.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go", | ||
"postbuild": "npm run gofmt && npm run patch", | ||
"test": "node --test" | ||
}, | ||
"engines": { | ||
"node": ">=16.17.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": 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
Oops, something went wrong.