boilerplate

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Boilerplates = []Boilerplate{
	{
		Name:        "Node.js - Express",
		Message:     "Lean how to use Express at https://expressjs.com",
		DownloadURL: "/leancloud/node-js-getting-started/zipball/master",
	},
	{
		Name:        "Node.js - Koa",
		DownloadURL: "/leancloud/koa-getting-started/zipball/master",
		Message:     "Lean how to use Koa at https://koajs.com",
	},
	{
		Name:        "Python - Flask",
		DownloadURL: "/leancloud/python-getting-started/zipball/master",
		Message:     "Lean how to use Flask at https://flask.palletsprojects.com",
	},
	{
		Name:        "Python - Django",
		DownloadURL: "/leancloud/django-getting-started/zipball/master",
		Message:     "Lean how to use Django at https://docs.djangoproject.com",
	},
	{
		Name:        "Java - Servlet",
		DownloadURL: "/leancloud/servlet-getting-started/zipball/master",
	},
	{
		Name:        "Java - Spring Boot",
		DownloadURL: "/leancloud/spring-boot-getting-started/zipball/master",
		Message:     "Lean how to use Spring Boot at https://spring.io/projects/spring-boot",
	},
	{
		Name:        "PHP - Slim",
		DownloadURL: "/leancloud/slim-getting-started/zipball/master",
		Message:     "Lean how to use Slim at https://www.slimframework.com",
	},
	{
		Name:        ".NET Core",
		DownloadURL: "/leancloud/dotnet-core-getting-started/zipball/master",
		Message:     "Lean how to use .NET Core at https://docs.microsoft.com/aspnet/core/",
	},
	{
		Name:        "Go - Echo",
		DownloadURL: "/leancloud/golang-getting-started/zipball/master",
		Message:     "Lean how to use Echo at https://echo.labstack.com/",
	},
	{
		Name:  "React Web App (via create-react-app)",
		Files: prepareWebAppFiles("build"),
		CMD: func(dest string) []string {
			return []string{"npx", "create-react-app", dest, "--use-npm"}
		},
	},
	{
		Name:  "Vue Web App (via @vue/cli)",
		Files: prepareWebAppFiles("dist"),
		CMD: func(dest string) []string {
			return []string{"npx", "@vue/cli", "create", "--default", "--packageManager", "npm", dest}
		},
	},
}

Functions

func CreateProject added in v1.0.0

func CreateProject(boil *Boilerplate, dest string, appID string, region regions.Region) error

Types

type Boilerplate

type Boilerplate struct {
	Name        string
	Message     string
	DownloadURL string
	CMD         func(dest string) []string
	Files       map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL