-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to define prefix / suffix for TS module (#2101)
* add tspostfix and tsprefix flags + organise under struct * postifx -> suffix * tsPrefix options on bindings struct * pass prefix and suffix to the executable * add support for CLI flags for generating module * method to set TSpref/suff to bindings * use passed ts prefix for typescriptify * add brief Readme udpate to include new flags * create reusable common flags * use common flags instead of hardcoded text * support tsprefix & suffix for dev * add tsPrefix & tsSuffix for build cmd * take pref & suff in account when gen d.ts * export colorsful log functions into utils for reuse * detect and warn the user about usage of reserved keyword * fmt * add TrimSpace on fn input * refactor utils -> logutils * add bindings -> ts_generation options to wailsjson parse * use wailsjson for ts generation * update warning message + extract to func * remove suff/pref info from readme * update json schema * add tests for prefix and suffix case * rename suffix method * Update v2/internal/typescriptify/typescriptify.go Co-authored-by: Lea Anthony <[email protected]> * Update website/static/schemas/config.v2.json Co-authored-by: Lea Anthony <[email protected]> * Update website/static/schemas/config.v2.json Co-authored-by: Lea Anthony <[email protected]> * update changelog * Minor tweaks Co-authored-by: Lea Anthony <[email protected]>
- Loading branch information
1 parent
c1c1bff
commit ca8a1fa
Showing
20 changed files
with
352 additions
and
67 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
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
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,31 @@ | ||
package logutils | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/wailsapp/wails/v2/internal/colour" | ||
) | ||
|
||
func LogGreen(message string, args ...interface{}) { | ||
if len(message) == 0 { | ||
return | ||
} | ||
text := fmt.Sprintf(message, args...) | ||
println(colour.Green(text)) | ||
} | ||
|
||
func LogRed(message string, args ...interface{}) { | ||
if len(message) == 0 { | ||
return | ||
} | ||
text := fmt.Sprintf(message, args...) | ||
println(colour.Red(text)) | ||
} | ||
|
||
func LogDarkYellow(message string, args ...interface{}) { | ||
if len(message) == 0 { | ||
return | ||
} | ||
text := fmt.Sprintf(message, args...) | ||
println(colour.DarkYellow(text)) | ||
} |
Oops, something went wrong.