Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add go to quick start functions #1270

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/lib/stores/marketplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const TemplateRuntimes = {
RUBY: { name: 'ruby', versions: ['3.3', '3.2', '3.1', '3.0'] },
PYTHON: { name: 'python', versions: ['3.12', '3.11', '3.10', '3.9', '3.8'] },
DART: { name: 'dart', versions: ['3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16', '2.16'] },
BUN: { name: 'bun', versions: ['1.0'] }
BUN: { name: 'bun', versions: ['1.0'] },
GO: { name: 'go', versions: ['1.22'] }
};

const getRuntimes = (
Expand Down Expand Up @@ -45,21 +46,22 @@ export const marketplace: MarketplaceTemplate[] = [
usecases: ['Starter'],
runtimes: [
...getRuntimes(TemplateRuntimes.NODE, 'npm install', 'src/main.js', 'node/starter'),
...getRuntimes(
TemplateRuntimes.PHP,
'composer install',
'src/index.php',
'php/starter'
),
...getRuntimes(TemplateRuntimes.RUBY, 'bundle install', 'lib/main.rb', 'ruby/starter'),
...getRuntimes(
TemplateRuntimes.PYTHON,
'pip install -r requirements.txt',
'src/main.py',
'python/starter'
),
...getRuntimes(TemplateRuntimes.DART, 'dart pub get', 'lib/main.dart', 'dart/starter'),
...getRuntimes(TemplateRuntimes.BUN, 'bun install', 'src/main.ts', 'bun/starter')
...getRuntimes(
TemplateRuntimes.PHP,
'composer install',
'src/index.php',
'php/starter'
),
...getRuntimes(TemplateRuntimes.BUN, 'bun install', 'src/main.ts', 'bun/starter'),
...getRuntimes(TemplateRuntimes.GO, '', 'main.go', 'go/starter'),
...getRuntimes(TemplateRuntimes.RUBY, 'bundle install', 'lib/main.rb', 'ruby/starter')
],
instructions: `For documentation and instructions check out <a target="_blank" rel="noopener noreferrer" class="link" href="https://github.com/appwrite/templates/tree/main/node/starter">file</a>.`,
vcsProvider: 'github',
Expand Down
7 changes: 7 additions & 0 deletions src/lib/wizards/functions/cover.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@
{/await}
</ul>
</section>

<Button
text
class="u-margin-block-start-24 u-margin-inline-start-auto"
href={`${base}/project-${$page.params.project}/functions/templates?useCase=Starter`}>
All starter templates <span class="icon-cheveron-right" />
</Button>
<div class="u-sep-block-start common-section" />
<section class="common-section">
<Heading size="6" tag="h6">Templates</Heading>
Expand Down
Loading