mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 22:20:06 +08:00
commit
1ce0620620
26
.vscode/launch.json
vendored
26
.vscode/launch.json
vendored
@ -5,14 +5,36 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch",
|
||||
"name": "Wails Init",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/wails/main.go",
|
||||
"env": {},
|
||||
"cwd": "/tmp",
|
||||
"args": [
|
||||
"setup"
|
||||
"init",
|
||||
"-name",
|
||||
"runtime",
|
||||
"-dir",
|
||||
"runtime",
|
||||
"-output",
|
||||
"runtime",
|
||||
"-template",
|
||||
"vuebasic"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Wails Update Pre",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/wails/main.go",
|
||||
"env": {},
|
||||
"cwd": "/tmp",
|
||||
"args": [
|
||||
"update",
|
||||
"-pre"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -33,7 +33,7 @@ Wails is currently in Beta. Please make sure you read the [Project Status](https
|
||||
|
||||
Wails uses cgo to bind to the native rendering engines so a number of platform dependent libraries are needed as well as an installation of Go. The basic requirements are:
|
||||
|
||||
- Go 1.11 or above
|
||||
- Go 1.12
|
||||
- npm
|
||||
|
||||
### MacOS
|
||||
|
15
cmd/cli.go
15
cmd/cli.go
@ -96,6 +96,7 @@ type Command struct {
|
||||
flagCount int
|
||||
log *Logger
|
||||
helpFlag bool
|
||||
hidden bool
|
||||
}
|
||||
|
||||
// NewCommand creates a new Command
|
||||
@ -106,6 +107,7 @@ func NewCommand(name string, description string, app *Cli, parentCommandPath str
|
||||
SubCommandsMap: make(map[string]*Command),
|
||||
App: app,
|
||||
log: NewLogger(),
|
||||
hidden: false,
|
||||
}
|
||||
|
||||
// Set up command path
|
||||
@ -212,6 +214,9 @@ func (c *Command) PrintHelp() {
|
||||
c.log.White("Available commands:")
|
||||
fmt.Println("")
|
||||
for _, subcommand := range c.SubCommands {
|
||||
if subcommand.isHidden() {
|
||||
continue
|
||||
}
|
||||
spacer := strings.Repeat(" ", 3+c.longestSubcommand-len(subcommand.Name))
|
||||
isDefault := ""
|
||||
if subcommand.isDefaultCommand() {
|
||||
@ -237,6 +242,16 @@ func (c *Command) isDefaultCommand() bool {
|
||||
return c.App.defaultCommand == c
|
||||
}
|
||||
|
||||
// isHidden returns true if the command is a hidden command
|
||||
func (c *Command) isHidden() bool {
|
||||
return c.hidden
|
||||
}
|
||||
|
||||
// Hidden hides the command from the Help system
|
||||
func (c *Command) Hidden() {
|
||||
c.hidden = true
|
||||
}
|
||||
|
||||
// Command - Defines a subcommand
|
||||
func (c *Command) Command(name, description string) *Command {
|
||||
result := NewCommand(name, description, c.App, c.CommandPath)
|
||||
|
File diff suppressed because one or more lines are too long
76
cmd/fs.go
76
cmd/fs.go
@ -1,13 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/leaanthony/slicer"
|
||||
)
|
||||
|
||||
// FSHelper - Wrapper struct for File System utility commands
|
||||
@ -104,11 +110,33 @@ func (fs *FSHelper) RemoveFiles(files []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Dir holds information about a directory
|
||||
type Dir struct {
|
||||
localPath string
|
||||
fullPath string
|
||||
}
|
||||
|
||||
// Directory creates a new Dir struct with the given directory path
|
||||
func (fs *FSHelper) Directory(dir string) (*Dir, error) {
|
||||
fullPath, err := filepath.Abs(dir)
|
||||
return &Dir{fullPath: fullPath}, err
|
||||
}
|
||||
|
||||
// LocalDir creates a new Dir struct based on a path relative to the caller
|
||||
func (fs *FSHelper) LocalDir(dir string) (*Dir, error) {
|
||||
_, filename, _, _ := runtime.Caller(1)
|
||||
fullPath, err := filepath.Abs(filepath.Join(path.Dir(filename), dir))
|
||||
return &Dir{
|
||||
localPath: dir,
|
||||
fullPath: fullPath,
|
||||
}, err
|
||||
}
|
||||
|
||||
// GetSubdirs will return a list of FQPs to subdirectories in the given directory
|
||||
func (fs *FSHelper) GetSubdirs(dir string) (map[string]string, error) {
|
||||
func (d *Dir) GetSubdirs() (map[string]string, error) {
|
||||
|
||||
// Read in the directory information
|
||||
fileInfo, err := ioutil.ReadDir(dir)
|
||||
fileInfo, err := ioutil.ReadDir(d.fullPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -120,25 +148,65 @@ func (fs *FSHelper) GetSubdirs(dir string) (map[string]string, error) {
|
||||
// map["directoryName"] = "path/to/directoryName"
|
||||
for _, file := range fileInfo {
|
||||
if file.IsDir() {
|
||||
subdirs[file.Name()] = filepath.Join(dir, file.Name())
|
||||
subdirs[file.Name()] = filepath.Join(d.fullPath, file.Name())
|
||||
}
|
||||
}
|
||||
return subdirs, nil
|
||||
}
|
||||
|
||||
// GetAllFilenames returns all filename in and below this directory
|
||||
func (d *Dir) GetAllFilenames() (*slicer.StringSlicer, error) {
|
||||
result := slicer.String()
|
||||
err := filepath.Walk(d.fullPath, func(dir string, info os.FileInfo, err error) error {
|
||||
if dir == d.fullPath {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Don't copy template metadata
|
||||
result.Add(dir)
|
||||
|
||||
return nil
|
||||
})
|
||||
return result, err
|
||||
}
|
||||
|
||||
// MkDir creates the given directory.
|
||||
// Returns error on failure
|
||||
func (fs *FSHelper) MkDir(dir string) error {
|
||||
return os.Mkdir(dir, 0700)
|
||||
}
|
||||
|
||||
// SaveAsJSON saves the JSON representation of the given data to the given filename
|
||||
func (fs *FSHelper) SaveAsJSON(data interface{}, filename string) error {
|
||||
|
||||
var buf bytes.Buffer
|
||||
e := json.NewEncoder(&buf)
|
||||
e.SetEscapeHTML(false)
|
||||
e.SetIndent("", " ")
|
||||
e.Encode(data)
|
||||
|
||||
err := ioutil.WriteFile(filename, buf.Bytes(), 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// LoadAsString will attempt to load the given file and return
|
||||
// its contents as a string
|
||||
func (fs *FSHelper) LoadAsString(filename string) (string, error) {
|
||||
bytes, err := ioutil.ReadFile(filename)
|
||||
bytes, err := fs.LoadAsBytes(filename)
|
||||
return string(bytes), err
|
||||
}
|
||||
|
||||
// LoadAsBytes returns the contents of the file as a byte slice
|
||||
func (fs *FSHelper) LoadAsBytes(filename string) ([]byte, error) {
|
||||
return ioutil.ReadFile(filename)
|
||||
}
|
||||
|
||||
// FileMD5 returns the md5sum of the given file
|
||||
func (fs *FSHelper) FileMD5(filename string) (string, error) {
|
||||
f, err := os.Open(filename)
|
||||
|
@ -56,7 +56,7 @@ func GetLinuxDistroInfo() *DistroInfo {
|
||||
switch value {
|
||||
case "Ubuntu":
|
||||
result.Distribution = Ubuntu
|
||||
case "Arch":
|
||||
case "Arch", "ManjaroLinux":
|
||||
result.Distribution = Arch
|
||||
}
|
||||
case "Description":
|
||||
|
@ -52,7 +52,7 @@ func getRequiredProgramsLinux() *Prerequisites {
|
||||
case Ubuntu:
|
||||
result.Add(newPrerequisite("gcc", "Please install with `sudo apt install build-essentials` and try again"))
|
||||
result.Add(newPrerequisite("pkg-config", "Please install with `sudo apt install pkg-config` and try again"))
|
||||
result.Add(newPrerequisite("npm", "Please install with `sudo apt install npm` and try again"))
|
||||
result.Add(newPrerequisite("npm", "Please install with `sudo snap install node --channel=12/stable --classic` and try again"))
|
||||
|
||||
default:
|
||||
result.Add(newPrerequisite("gcc", "Please install with your system package manager and try again"))
|
||||
|
@ -50,12 +50,6 @@ func NewProjectHelper() *ProjectHelper {
|
||||
// GenerateProject generates a new project using the options given
|
||||
func (ph *ProjectHelper) GenerateProject(projectOptions *ProjectOptions) error {
|
||||
|
||||
// exists := ph.templates.TemplateExists(projectOptions.Template)
|
||||
|
||||
// if !exists {
|
||||
// return fmt.Errorf("template '%s' is invalid", projectOptions.Template)
|
||||
// }
|
||||
|
||||
// Calculate project path
|
||||
projectPath, err := filepath.Abs(projectOptions.OutputDirectory)
|
||||
if err != nil {
|
||||
@ -90,8 +84,6 @@ func (ph *ProjectHelper) GenerateProject(projectOptions *ProjectOptions) error {
|
||||
// ph.GenerateWindowsResourceConfig(projectOptions)
|
||||
// }
|
||||
|
||||
ph.log.Yellow("Project '%s' generated in directory '%s'!", projectOptions.Name, projectOptions.OutputDirectory)
|
||||
ph.log.Yellow("To compile the project, run 'wails build' in the project directory.")
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -173,19 +165,43 @@ func (po *ProjectOptions) PromptForInputs() error {
|
||||
// Process Templates
|
||||
templateList := slicer.Interface()
|
||||
options := slicer.String()
|
||||
for _, templateDetails := range po.templates.TemplateList.details {
|
||||
templateList.Add(templateDetails)
|
||||
options.Add(fmt.Sprintf("%s - %s", templateDetails.Metadata.Name, templateDetails.Metadata.ShortDescription))
|
||||
templateDetails, err := po.templates.GetTemplateDetails()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
templateIndex := 0
|
||||
if po.Template != "" {
|
||||
// Check template is valid if given
|
||||
if templateDetails[po.Template] == nil {
|
||||
keys := make([]string, 0, len(templateDetails))
|
||||
for k := range templateDetails {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
return fmt.Errorf("invalid template name '%s'. Valid options: %s", po.Template, strings.Join(keys, ", "))
|
||||
}
|
||||
po.selectedTemplate = templateDetails[po.Template]
|
||||
} else {
|
||||
|
||||
if len(options.AsSlice()) > 1 {
|
||||
templateIndex = PromptSelection("Please select a template", options.AsSlice(), 0)
|
||||
for _, templateDetail := range templateDetails {
|
||||
templateList.Add(templateDetail)
|
||||
options.Add(fmt.Sprintf("%s - %s", templateDetail.Metadata.Name, templateDetail.Metadata.ShortDescription))
|
||||
}
|
||||
|
||||
templateIndex := 0
|
||||
|
||||
if len(options.AsSlice()) > 1 {
|
||||
templateIndex = PromptSelection("Please select a template", options.AsSlice(), 0)
|
||||
}
|
||||
|
||||
if len(templateList.AsSlice()) == 0 {
|
||||
return fmt.Errorf("aborting: no templates found")
|
||||
}
|
||||
|
||||
// After selection do this....
|
||||
po.selectedTemplate = templateList.AsSlice()[templateIndex].(*TemplateDetails)
|
||||
}
|
||||
|
||||
// After selection do this....
|
||||
po.selectedTemplate = templateList.AsSlice()[templateIndex].(*TemplateDetails)
|
||||
fmt.Println("Template: " + po.selectedTemplate.Metadata.Name)
|
||||
|
||||
// Setup NPM Project name
|
||||
po.NPMProjectName = strings.ToLower(strings.Replace(po.Name, " ", "_", -1))
|
||||
@ -266,7 +282,6 @@ func processProjectName(po *ProjectOptions) {
|
||||
po.Name = Prompt("The name of the project", "My Project")
|
||||
}
|
||||
fmt.Println("Project Name: " + po.Name)
|
||||
|
||||
}
|
||||
|
||||
func processBinaryName(po *ProjectOptions) {
|
||||
|
@ -68,6 +68,17 @@ func (s *SystemHelper) ConfigFileIsValid() bool {
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// GetAuthor returns a formatted string of the user's name and email
|
||||
func (s *SystemHelper) GetAuthor() (string, error) {
|
||||
var config *SystemConfig
|
||||
config, err := s.LoadConfig()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s <%s>", config.Name, config.Email), nil
|
||||
}
|
||||
|
||||
// BackupConfig attempts to backup the system config file
|
||||
func (s *SystemHelper) BackupConfig() (string, error) {
|
||||
now := strconv.FormatInt(time.Now().UTC().UnixNano(), 10)
|
||||
|
176
cmd/templates.go
176
cmd/templates.go
@ -3,20 +3,21 @@ package cmd
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
mewn "github.com/leaanthony/mewn"
|
||||
mewnlib "github.com/leaanthony/mewn/lib"
|
||||
"github.com/kennygrant/sanitize"
|
||||
"github.com/leaanthony/slicer"
|
||||
)
|
||||
|
||||
// TemplateMetadata holds all the metadata for a Wails template
|
||||
type TemplateMetadata struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
ShortDescription string `json:"shortdescription"`
|
||||
Description string `json:"description"`
|
||||
Install string `json:"install"`
|
||||
@ -26,92 +27,146 @@ type TemplateMetadata struct {
|
||||
FrontendDir string `json:"frontenddir"`
|
||||
Serve string `json:"serve"`
|
||||
Bridge string `json:"bridge"`
|
||||
WailsDir string `json:"wailsdir"`
|
||||
}
|
||||
|
||||
// TemplateDetails holds information about a specific template
|
||||
type TemplateDetails struct {
|
||||
BasePath string
|
||||
Name string
|
||||
Path string
|
||||
Metadata *TemplateMetadata
|
||||
}
|
||||
|
||||
// TemplateList is a list of available templates
|
||||
type TemplateList struct {
|
||||
details map[string]*TemplateDetails
|
||||
}
|
||||
|
||||
// NewTemplateList creates a new TemplateList object
|
||||
func NewTemplateList(filenames *mewnlib.FileGroup) *TemplateList {
|
||||
// Iterate each template and store information
|
||||
|
||||
result := &TemplateList{details: make(map[string]*TemplateDetails)}
|
||||
|
||||
entries := slicer.String()
|
||||
entries.AddSlice(filenames.Entries())
|
||||
|
||||
// Find all template.json files
|
||||
metadataFiles := entries.Filter(func(filename string) bool {
|
||||
match, _ := regexp.MatchString("(.)+template.json$", filename)
|
||||
return match
|
||||
})
|
||||
|
||||
// Load each metadata file
|
||||
metadataFiles.Each(func(filename string) {
|
||||
fileData := filenames.Bytes(filename)
|
||||
var metadata TemplateMetadata
|
||||
err := json.Unmarshal(fileData, &metadata)
|
||||
if err != nil {
|
||||
log.Fatalf("corrupt metadata for template: %s", filename)
|
||||
}
|
||||
path := strings.Split(filename, "/")[0]
|
||||
thisTemplate := &TemplateDetails{Path: path, Metadata: &metadata}
|
||||
result.details[filename] = thisTemplate
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// Template holds details about a Wails template
|
||||
type Template struct {
|
||||
Name string
|
||||
Path string
|
||||
Description string
|
||||
fs *FSHelper
|
||||
}
|
||||
|
||||
// TemplateHelper is a utility object to help with processing templates
|
||||
type TemplateHelper struct {
|
||||
TemplateList *TemplateList
|
||||
Files *mewnlib.FileGroup
|
||||
templateDir *Dir
|
||||
fs *FSHelper
|
||||
metadataFilename string
|
||||
}
|
||||
|
||||
// NewTemplateHelper creates a new template helper
|
||||
func NewTemplateHelper() *TemplateHelper {
|
||||
files := mewn.Group("./templates")
|
||||
|
||||
templateDir, err := fs.LocalDir("./templates")
|
||||
if err != nil {
|
||||
log.Fatal("Unable to find the template directory. Please reinstall Wails.")
|
||||
}
|
||||
|
||||
return &TemplateHelper{
|
||||
TemplateList: NewTemplateList(files),
|
||||
Files: files,
|
||||
templateDir: templateDir,
|
||||
metadataFilename: "template.json",
|
||||
}
|
||||
}
|
||||
|
||||
// IsValidTemplate returns true if the given tempalte name resides on disk
|
||||
func (t *TemplateHelper) IsValidTemplate(templateName string) bool {
|
||||
pathToTemplate := filepath.Join(t.templateDir.fullPath, templateName)
|
||||
return t.fs.DirExists(pathToTemplate)
|
||||
}
|
||||
|
||||
// SanitizeFilename sanitizes the given string to make a valid filename
|
||||
func (t *TemplateHelper) SanitizeFilename(name string) string {
|
||||
return sanitize.Name(name)
|
||||
}
|
||||
|
||||
// CreateNewTemplate creates a new template based on the given directory name and string
|
||||
func (t *TemplateHelper) CreateNewTemplate(dirname string, details *TemplateMetadata) (string, error) {
|
||||
|
||||
// Check if this template has already been created
|
||||
if t.IsValidTemplate(dirname) {
|
||||
return "", fmt.Errorf("cannot create template in directory '%s' - already exists", dirname)
|
||||
}
|
||||
|
||||
targetDir := filepath.Join(t.templateDir.fullPath, dirname)
|
||||
err := t.fs.MkDir(targetDir)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
targetMetadata := filepath.Join(targetDir, t.metadataFilename)
|
||||
err = t.fs.SaveAsJSON(details, targetMetadata)
|
||||
|
||||
return targetDir, err
|
||||
}
|
||||
|
||||
// LoadMetadata loads the template's 'metadata.json' file
|
||||
func (t *TemplateHelper) LoadMetadata(dir string) (*TemplateMetadata, error) {
|
||||
templateFile := filepath.Join(dir, t.metadataFilename)
|
||||
result := &TemplateMetadata{}
|
||||
if !t.fs.FileExists(templateFile) {
|
||||
return nil, nil
|
||||
}
|
||||
rawJSON, err := ioutil.ReadFile(templateFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal(rawJSON, &result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
// GetTemplateDetails returns a map of Template structs containing details
|
||||
// of the found templates
|
||||
func (t *TemplateHelper) GetTemplateDetails() (map[string]*TemplateDetails, error) {
|
||||
|
||||
// Get the subdirectory details
|
||||
templateDirs, err := t.templateDir.GetSubdirs()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := make(map[string]*TemplateDetails)
|
||||
|
||||
for name, dir := range templateDirs {
|
||||
result[name] = &TemplateDetails{
|
||||
Path: dir,
|
||||
}
|
||||
_ = &TemplateMetadata{}
|
||||
metadata, err := t.LoadMetadata(dir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result[name].Metadata = metadata
|
||||
if metadata.Name != "" {
|
||||
result[name].Name = metadata.Name
|
||||
} else {
|
||||
// Ignore bad templates?
|
||||
result[name] = nil
|
||||
}
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// GetTemplateFilenames returns all the filenames of the given template
|
||||
func (t *TemplateHelper) GetTemplateFilenames(template *TemplateDetails) (*slicer.StringSlicer, error) {
|
||||
|
||||
// Get the subdirectory details
|
||||
templateDir, err := t.fs.Directory(template.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return templateDir.GetAllFilenames()
|
||||
}
|
||||
|
||||
// InstallTemplate installs the template given in the project options to the
|
||||
// project path given
|
||||
func (t *TemplateHelper) InstallTemplate(projectPath string, projectOptions *ProjectOptions) error {
|
||||
|
||||
// Get template files
|
||||
templateFilenames, err := t.GetTemplateFilenames(projectOptions.selectedTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
templatePath := projectOptions.selectedTemplate.Path
|
||||
|
||||
templateFilenames := slicer.String()
|
||||
templateFilenames.AddSlice(projectOptions.templates.Files.Entries())
|
||||
|
||||
templateJSONFilename := filepath.Join(templatePath, "template.json")
|
||||
templateJSONFilename := filepath.Join(templatePath, t.metadataFilename)
|
||||
|
||||
templateFiles := templateFilenames.Filter(func(filename string) bool {
|
||||
filename = filepath.FromSlash(filename)
|
||||
return strings.HasPrefix(filename, templatePath) && filename != templateJSONFilename
|
||||
})
|
||||
|
||||
var err error
|
||||
templateFiles.Each(func(templateFile string) {
|
||||
|
||||
// Setup filenames
|
||||
@ -120,11 +175,14 @@ func (t *TemplateHelper) InstallTemplate(projectPath string, projectOptions *Pro
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
filedata := projectOptions.templates.Files.Bytes(templateFile)
|
||||
filedata, err := t.fs.LoadAsBytes(templateFile)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// If file is a template, process it
|
||||
if strings.HasSuffix(templateFile, ".template") {
|
||||
templateData := projectOptions.templates.Files.String(templateFile)
|
||||
templateData := string(filedata)
|
||||
tmpl := template.New(templateFile)
|
||||
tmpl.Parse(templateData)
|
||||
var tpl bytes.Buffer
|
||||
|
11109
cmd/templates/vuebasic/frontend/package-lock.json
generated
11109
cmd/templates/vuebasic/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
3
cmd/templates/vuetify-basic/.jshint
Normal file
3
cmd/templates/vuetify-basic/.jshint
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"esversion": 6
|
||||
}
|
21
cmd/templates/vuetify-basic/frontend/.gitignore
vendored
Normal file
21
cmd/templates/vuetify-basic/frontend/.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw*
|
5
cmd/templates/vuetify-basic/frontend/babel.config.js
Normal file
5
cmd/templates/vuetify-basic/frontend/babel.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/app'
|
||||
]
|
||||
}
|
52
cmd/templates/vuetify-basic/frontend/package.json.template
Normal file
52
cmd/templates/vuetify-basic/frontend/package.json.template
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "{{.NPMProjectName}}",
|
||||
"author": "{{.Author.Name}}<{{.Author.Email}}>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"core-js": "^2.6.4",
|
||||
"material-design-icons-iconfont": "^5.0.1",
|
||||
"vue": "^2.5.22",
|
||||
"vuetify": "^1.5.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^3.4.0",
|
||||
"@vue/cli-plugin-eslint": "^3.4.0",
|
||||
"@vue/cli-service": "^3.4.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"eslint": "^5.8.0",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
"eventsource-polyfill": "^0.9.6",
|
||||
"vue-template-compiler": "^2.5.21",
|
||||
"webpack-hot-middleware": "^2.24.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"rules": {},
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
}
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
]
|
||||
}
|
60
cmd/templates/vuetify-basic/frontend/src/App.vue
Normal file
60
cmd/templates/vuetify-basic/frontend/src/App.vue
Normal file
@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<v-app id="inspire" dark>
|
||||
<v-navigation-drawer v-model="drawer" clipped fixed app>
|
||||
<v-list dense>
|
||||
<v-list-tile>
|
||||
<v-list-tile-action>
|
||||
<v-icon>dashboard</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Dashboard</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile>
|
||||
<v-list-tile-action>
|
||||
<v-icon>settings</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Settings</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
<v-toolbar app fixed clipped-left>
|
||||
<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
|
||||
<v-toolbar-title>Application</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-content>
|
||||
<v-container fluid class="px-0">
|
||||
<v-layout justify-center align-center class="px-0">
|
||||
<hello-world></hello-world>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<v-footer app fixed>
|
||||
<span style="margin-left:1em">© You</span>
|
||||
</v-footer>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from "./components/HelloWorld.vue";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
drawer: false
|
||||
}),
|
||||
components: {
|
||||
HelloWorld
|
||||
},
|
||||
props: {
|
||||
source: String
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.logo {
|
||||
width: 16em;
|
||||
}
|
||||
</style>
|
BIN
cmd/templates/vuetify-basic/frontend/src/assets/images/logo.png
Normal file
BIN
cmd/templates/vuetify-basic/frontend/src/assets/images/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 301 KiB |
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<v-container fluid class="px-0">
|
||||
<v-layout>
|
||||
<v-flex xs12 sm6 offset-sm3>
|
||||
<v-card raised="raised" class="pa-4 ma-4">
|
||||
<v-layout justify-center align-center class="pa-4 ma-4">
|
||||
<v-img :src="require('../assets/images/logo.png')"></v-img>
|
||||
</v-layout>
|
||||
<v-card-actions>
|
||||
<v-layout justify-center align-center class="px-0">
|
||||
<v-btn color="blue" dark @click="getMessage">Press Me</v-btn>
|
||||
</v-layout>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<div class="text-xs-center">
|
||||
<v-dialog v-model="dialog" width="500">
|
||||
<v-card>
|
||||
<v-card-title class="headline" primary-title>Message from Go</v-card-title>
|
||||
<v-card-text>{{message}}</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog = false">Awesome</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
message: " ",
|
||||
raised: true,
|
||||
dialog: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getMessage: function() {
|
||||
var self = this;
|
||||
window.backend.basic().then(result => {
|
||||
self.message = result;
|
||||
self.dialog = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h1 {
|
||||
margin-top: 2em;
|
||||
position: relative;
|
||||
min-height: 5rem;
|
||||
width: 100%;
|
||||
}
|
||||
a:hover {
|
||||
font-size: 1.7em;
|
||||
border-color: blue;
|
||||
background-color: blue;
|
||||
color: white;
|
||||
border: 3px solid white;
|
||||
border-radius: 10px;
|
||||
padding: 9px;
|
||||
cursor: pointer;
|
||||
transition: 500ms;
|
||||
}
|
||||
a {
|
||||
font-size: 1.7em;
|
||||
border-color: white;
|
||||
background-color: #121212;
|
||||
color: white;
|
||||
border: 3px solid white;
|
||||
border-radius: 10px;
|
||||
padding: 9px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
21
cmd/templates/vuetify-basic/frontend/src/main.js
Normal file
21
cmd/templates/vuetify-basic/frontend/src/main.js
Normal file
@ -0,0 +1,21 @@
|
||||
import 'babel-polyfill';
|
||||
import Vue from "vue";
|
||||
|
||||
// Setup Vuetify
|
||||
import Vuetify from 'vuetify';
|
||||
Vue.use(Vuetify);
|
||||
import 'vuetify/dist/vuetify.min.css';
|
||||
import 'material-design-icons-iconfont';
|
||||
|
||||
import App from "./App.vue";
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
Vue.config.devtools = true;
|
||||
|
||||
import Bridge from "./wailsbridge";
|
||||
|
||||
Bridge.Start(() => {
|
||||
new Vue({
|
||||
render: h => h(App)
|
||||
}).$mount("#app");
|
||||
});
|
43
cmd/templates/vuetify-basic/frontend/vue.config.js
Normal file
43
cmd/templates/vuetify-basic/frontend/vue.config.js
Normal file
@ -0,0 +1,43 @@
|
||||
let cssConfig = {};
|
||||
|
||||
if (process.env.NODE_ENV == "production") {
|
||||
cssConfig = {
|
||||
extract: {
|
||||
filename: "[name].css",
|
||||
chunkFilename: "[name].css"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
chainWebpack: config => {
|
||||
let limit = 9999999999999999;
|
||||
config.module
|
||||
.rule("images")
|
||||
.test(/\.(png|gif|jpg)(\?.*)?$/i)
|
||||
.use("url-loader")
|
||||
.loader("url-loader")
|
||||
.tap(options => Object.assign(options, { limit: limit }));
|
||||
config.module
|
||||
.rule("fonts")
|
||||
.test(/\.(woff2?|eot|ttf|otf|svg)(\?.*)?$/i)
|
||||
.use("url-loader")
|
||||
.loader("url-loader")
|
||||
.options({
|
||||
limit: limit
|
||||
});
|
||||
},
|
||||
css: cssConfig,
|
||||
configureWebpack: {
|
||||
output: {
|
||||
filename: "[name].js"
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: false
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
disableHostCheck: true,
|
||||
host: "localhost"
|
||||
}
|
||||
};
|
1
cmd/templates/vuetify-basic/go.mod.template
Normal file
1
cmd/templates/vuetify-basic/go.mod.template
Normal file
@ -0,0 +1 @@
|
||||
module {{.BinaryName}}
|
27
cmd/templates/vuetify-basic/main.go.template
Normal file
27
cmd/templates/vuetify-basic/main.go.template
Normal file
@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/leaanthony/mewn"
|
||||
"github.com/wailsapp/wails"
|
||||
)
|
||||
|
||||
func basic() string {
|
||||
return "Hello World!"
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
js := mewn.String("./frontend/dist/app.js")
|
||||
css := mewn.String("./frontend/dist/app.css")
|
||||
|
||||
app := wails.CreateApp(&wails.AppConfig{
|
||||
Width: 1024,
|
||||
Height: 768,
|
||||
Title: "{{.Name}}",
|
||||
JS: js,
|
||||
CSS: css,
|
||||
Colour: "#131313",
|
||||
})
|
||||
app.Bind(basic)
|
||||
app.Run()
|
||||
}
|
14
cmd/templates/vuetify-basic/template.json
Executable file
14
cmd/templates/vuetify-basic/template.json
Executable file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "Vuetify Basic",
|
||||
"version": "1.0.0",
|
||||
"shortdescription": "Vuetify + Webpack",
|
||||
"description": "Basic template using Vuetify and bundled using Webpack",
|
||||
"install": "npm install",
|
||||
"build": "npm run build",
|
||||
"author": "lea <lea.anthony@gmail.com>",
|
||||
"created": "2019-05-25 09:39:40.009307 +1000 AEST m=+59.539991073",
|
||||
"frontenddir": "frontend",
|
||||
"serve": "npm run serve",
|
||||
"bridge": "src",
|
||||
"wailsdir": ""
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
|
||||
// Version - Wails version
|
||||
const Version = "v0.13.3"
|
||||
const Version = "v0.15.0"
|
||||
|
121
cmd/wails/10.1_dev_newtemplate.go
Normal file
121
cmd/wails/10.1_dev_newtemplate.go
Normal file
@ -0,0 +1,121 @@
|
||||
// +build dev
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/wailsapp/wails/cmd"
|
||||
"gopkg.in/AlecAivazis/survey.v1"
|
||||
)
|
||||
|
||||
var templateHelper = cmd.NewTemplateHelper()
|
||||
|
||||
var qs = []*survey.Question{
|
||||
{
|
||||
Name: "Name",
|
||||
Prompt: &survey.Input{Message: "Please enter the name of your template (eg: React/Webpack Basic):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "ShortDescription",
|
||||
Prompt: &survey.Input{Message: "Please enter a short description for the template (eg: React with Webpack 4):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "Description",
|
||||
Prompt: &survey.Input{Message: "Please enter a long description:"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "FrontendDir",
|
||||
Prompt: &survey.Input{Message: "Please enter the name of the directory the frontend code resides (eg: frontend):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "Install",
|
||||
Prompt: &survey.Input{Message: "Please enter the install command (eg: npm install):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "Build",
|
||||
Prompt: &survey.Input{Message: "Please enter the build command (eg: npm run build):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "Serve",
|
||||
Prompt: &survey.Input{Message: "Please enter the serve command (eg: npm run serve):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
{
|
||||
Name: "Bridge",
|
||||
Prompt: &survey.Input{Message: "Please enter the name of the directory to copy the wails bridge runtime (eg: src):"},
|
||||
Validate: survey.Required,
|
||||
},
|
||||
}
|
||||
|
||||
func newTemplate(devCommand *cmd.Command) {
|
||||
|
||||
commandDescription := `This command scaffolds everything needed to develop a new template.`
|
||||
newTemplate := devCommand.Command("newtemplate", "Generate a new template").
|
||||
LongDescription(commandDescription)
|
||||
|
||||
newTemplate.Action(func() error {
|
||||
logger.PrintSmallBanner("Generating new project template")
|
||||
fmt.Println()
|
||||
|
||||
var answers cmd.TemplateMetadata
|
||||
|
||||
// perform the questions
|
||||
err := survey.Ask(qs, &answers)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
dirname := templateHelper.SanitizeFilename(answers.Name)
|
||||
prompt := []*survey.Question{{
|
||||
Prompt: &survey.Input{
|
||||
Message: "Please enter a directory name for the template:",
|
||||
Default: dirname,
|
||||
},
|
||||
Validate: func(val interface{}) error {
|
||||
err := survey.Required(val)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if templateHelper.IsValidTemplate(val.(string)) {
|
||||
return fmt.Errorf("template directory already exists")
|
||||
}
|
||||
if templateHelper.SanitizeFilename(val.(string)) != val.(string) {
|
||||
return fmt.Errorf("invalid directory name '%s'", val.(string))
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}}
|
||||
err = survey.Ask(prompt, &dirname)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
answers.Version = "1.0.0"
|
||||
answers.Created = time.Now().String()
|
||||
|
||||
// Get Author info from system info
|
||||
system := cmd.NewSystemHelper()
|
||||
author, err := system.GetAuthor()
|
||||
if err == nil {
|
||||
answers.Author = author
|
||||
}
|
||||
|
||||
templateDirectory, err := templateHelper.CreateNewTemplate(dirname, &answers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logger.Green("Created new template '%s' in directory '%s'", answers.Name, templateDirectory)
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
18
cmd/wails/10_dev.go
Normal file
18
cmd/wails/10_dev.go
Normal file
@ -0,0 +1,18 @@
|
||||
// +build dev
|
||||
|
||||
package main
|
||||
|
||||
func init() {
|
||||
|
||||
commandDescription := `This command provides access to developer tooling.`
|
||||
devCommand := app.Command("dev", "A selection of developer tools").
|
||||
LongDescription(commandDescription)
|
||||
|
||||
// Add subcommands
|
||||
newTemplate(devCommand)
|
||||
|
||||
devCommand.Action(func() error {
|
||||
devCommand.PrintHelp()
|
||||
return nil
|
||||
})
|
||||
}
|
@ -2,7 +2,10 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/leaanthony/spinner"
|
||||
"github.com/wailsapp/wails/cmd"
|
||||
)
|
||||
|
||||
@ -17,7 +20,7 @@ Any flags that are required and not given will be prompted for.`
|
||||
LongDescription(commandDescription).
|
||||
BoolFlag("f", "Use defaults", &projectOptions.UseDefaults).
|
||||
StringFlag("dir", "Directory to create project in", &projectOptions.OutputDirectory).
|
||||
// StringFlag("template", "Template name", &projectOptions.Template).
|
||||
StringFlag("template", "Template name", &projectOptions.Template).
|
||||
StringFlag("name", "Project name", &projectOptions.Name).
|
||||
StringFlag("description", "Project description", &projectOptions.Description).
|
||||
StringFlag("output", "Output binary name", &projectOptions.BinaryName)
|
||||
@ -50,11 +53,33 @@ Any flags that are required and not given will be prompted for.`
|
||||
}
|
||||
}
|
||||
|
||||
genSpinner := spinner.NewSpinner()
|
||||
genSpinner.SetSpinSpeed(50)
|
||||
genSpinner.Start("Generating project...")
|
||||
|
||||
// Generate the project
|
||||
err = projectHelper.GenerateProject(projectOptions)
|
||||
if err != nil {
|
||||
logger.Error(err.Error())
|
||||
genSpinner.Error()
|
||||
return err
|
||||
}
|
||||
genSpinner.Success()
|
||||
|
||||
// Build the project
|
||||
cwd, _ := os.Getwd()
|
||||
projectDir := filepath.Join(cwd, projectOptions.OutputDirectory)
|
||||
program := cmd.NewProgramHelper()
|
||||
buildSpinner := spinner.NewSpinner()
|
||||
buildSpinner.SetSpinSpeed(50)
|
||||
buildSpinner.Start("Building project (this may take a while)...")
|
||||
err = program.RunCommandArray([]string{"wails", "build"}, projectDir)
|
||||
if err != nil {
|
||||
buildSpinner.Error(err.Error())
|
||||
return err
|
||||
}
|
||||
buildSpinner.Success()
|
||||
logger.Yellow("Project '%s' built in directory '%s'!", projectOptions.Name, projectOptions.OutputDirectory)
|
||||
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ To help you in this process, we will ask for some information, add Go/Wails deta
|
||||
body = "**Description**\n" + (strings.Split(body, "**Description**")[1])
|
||||
fullURL := "https://github.com/wailsapp/wails/issues/new?"
|
||||
body = strings.Replace(body, "A clear and concise description of what the bug is.", description, -1)
|
||||
body = strings.Replace(body, "Please paste the output of `wails report` here.", str.String(), -1)
|
||||
body = strings.Replace(body, "Please provide your platform, GO version and variables, etc", str.String(), -1)
|
||||
params := "title=" + title + "&body=" + body
|
||||
|
||||
fmt.Println("Opening browser to file issue.")
|
||||
|
7
go.mod
7
go.mod
@ -9,10 +9,11 @@ require (
|
||||
github.com/go-playground/colors v1.2.0
|
||||
github.com/gorilla/websocket v1.4.0
|
||||
github.com/jackmordaunt/icns v1.0.0
|
||||
github.com/kennygrant/sanitize v1.2.4
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
|
||||
github.com/leaanthony/mewn v0.10.5
|
||||
github.com/leaanthony/mewn v0.10.7
|
||||
github.com/leaanthony/slicer v1.3.1
|
||||
github.com/leaanthony/spinner v0.5.0
|
||||
github.com/leaanthony/spinner v0.5.3
|
||||
github.com/masterminds/semver v1.4.2
|
||||
github.com/mattn/go-colorable v0.1.1 // indirect
|
||||
github.com/mattn/go-isatty v0.0.7 // indirect
|
||||
@ -23,6 +24,8 @@ require (
|
||||
github.com/sirupsen/logrus v1.4.1
|
||||
github.com/stretchr/testify v1.3.0 // indirect
|
||||
github.com/wailsapp/webview v0.2.7
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529 // indirect
|
||||
golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5 // indirect
|
||||
golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.4
|
||||
)
|
||||
|
38
go.sum
38
go.sum
@ -1,5 +1,7 @@
|
||||
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw=
|
||||
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -13,22 +15,28 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/go-playground/colors v1.2.0 h1:0EdjTXKrr2g1L/LQTYtIqabeHpZuGZz1U4osS1T8+5M=
|
||||
github.com/go-playground/colors v1.2.0/go.mod h1:miw1R2JIE19cclPxsXqNdzLZsk4DP4iF+m88bRc7kfM=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ=
|
||||
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
|
||||
github.com/jackmordaunt/icns v1.0.0 h1:RYSxplerf/l/DUd09AHtITwckkv/mqjVv4DjYdPmAMQ=
|
||||
github.com/jackmordaunt/icns v1.0.0/go.mod h1:7TTQVEuGzVVfOPPlLNHJIkzA6CoV7aH1Dv9dW351oOo=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/kennygrant/sanitize v1.2.4 h1:gN25/otpP5vAsO2djbMhF/LQX6R7+O1TB4yv8NzpJ3o=
|
||||
github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/leaanthony/mewn v0.10.5 h1:QKYVj8tI94alvVFZer7wPy66IcNpyNPITIkdhXbThX4=
|
||||
github.com/leaanthony/mewn v0.10.5/go.mod h1:i3ygCWW96qVQlGa8sjWnTM0IKAijoFvTwATDIZgK4k0=
|
||||
github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/leaanthony/mewn v0.10.7 h1:jCcNJyIUOpwj+I5SuATvCugDjHkoo+j6ubEOxxrxmPA=
|
||||
github.com/leaanthony/mewn v0.10.7/go.mod h1:CRkTx8unLiSSilu/Sd7i1LwrdaAL+3eQ3ses99qGMEQ=
|
||||
github.com/leaanthony/slicer v1.3.1 h1:n2iIV2sxvL/3bpnmVY0vBjXf3yYFWcB6CYLVMrzJxRw=
|
||||
github.com/leaanthony/slicer v1.3.1/go.mod h1:VMB/HGvr3uR3MRpFWHWAm0w+DHQLzPHYe2pKfpFlQIQ=
|
||||
github.com/leaanthony/spinner v0.5.0 h1:HQykt/iTy7fmINEREtRbWrt+8j4MxC8dtvWBxEWM9oA=
|
||||
github.com/leaanthony/spinner v0.5.0/go.mod h1:8TSFz9SL1AUC4XSbEFYE6SfN5Mlus51qYluVGrie9ww=
|
||||
github.com/leaanthony/spinner v0.5.3 h1:IMTvgdQCec5QA4qRy0wil4XsRP+QcG1OwLWVK/LPZ5Y=
|
||||
github.com/leaanthony/spinner v0.5.3/go.mod h1:oHlrvWicr++CVV7ALWYi+qHk/XNA91D9IJ48IqmpVUo=
|
||||
github.com/leaanthony/synx v0.1.0 h1:R0lmg2w6VMb8XcotOwAe5DLyzwjLrskNkwU7LLWsyL8=
|
||||
github.com/leaanthony/synx v0.1.0/go.mod h1:Iz7eybeeG8bdq640iR+CwYb8p+9EOsgMWghkSRyZcqs=
|
||||
github.com/leaanthony/wincursor v0.1.0 h1:Dsyp68QcF5cCs65AMBmxoYNEm0n8K7mMchG6a8fYxf8=
|
||||
@ -39,47 +47,53 @@ github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRU
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
|
||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
|
||||
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7TFZY106KVlPVa5jcYD1gaQf98=
|
||||
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/ribice/glice v0.0.0-20181011133736-685f13fa9b12/go.mod h1:A+ednilkKNW0CJGLsrLkq0D49M4EhlCi8gvnkwoZFn0=
|
||||
github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/wailsapp/webview v0.2.7 h1:fN5L5H9Oivg9IJPk7uaXQnjqB68Fny11ZWkIaTIZHmk=
|
||||
github.com/wailsapp/webview v0.2.7/go.mod h1:XO9HJbKWokDxUYTWQEBCYg95n/To1v7PxvanDNVf8hY=
|
||||
github.com/zserge/webview v0.0.0-20190123072648-16c93bcaeaeb/go.mod h1:a1CV8KR4Dd1eP2g+mEijGOp+HKczwdKHWyx0aPHKvo4=
|
||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529 h1:iMGN4xG0cnqj3t+zOM8wUB0BiPKHEwSxEZCvzcbZuvk=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5 h1:6M3SDHlHHDCx2PcQw3S4KsR170vGqDhJDOmpVd4Hjak=
|
||||
golang.org/x/net v0.0.0-20190509222800-a4d6f7feada5/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb h1:pf3XwC90UUdNPYWZdFjhGBE7DUFuK3Ct1zWmZ65QN30=
|
||||
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862 h1:rM0ROo5vb9AdYJi1110yjWGMej9ITfKddS89P3Fkhug=
|
||||
golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.4 h1:10xXXN3wgIhPheb5NI58zFgZv32Ana7P3Tl4shW+0Qc=
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.4/go.mod h1:iBNOmqKz/NUbZx3bA+4hAGLRC7fSK7tgtVDT4tB22XA=
|
||||
|
Loading…
Reference in New Issue
Block a user