Add JS template

This commit is contained in:
Matej Bačo
2025-03-11 11:49:31 +01:00
parent 7f05a74b31
commit 18e4be2eab
4 changed files with 49 additions and 5 deletions
+45
View File
@@ -135,6 +135,51 @@ return [
'providerVersion' => '0.1.*',
'variables' => []
],
[
'key' => 'starter-for-js',
'name' => 'JavaScript starter',
'useCases' => ['starter'],
'screenshotDark' => $url . '/images/sites/templates/starter-for-js-dark.png',
'screenshotLight' => $url . '/images/sites/templates/starter-for-js-light.png',
'frameworks' => [
getFramework('OTHER', [
'installCommand' => 'npm install',
'buildCommand' => 'npm run build',
'providerRootDirectory' => './',
'outputDirectory' => './dist',
]),
],
'vcsProvider' => 'github',
'providerRepositoryId' => 'starter-for-js',
'providerOwner' => 'appwrite',
'providerVersion' => '0.1.*',
'variables' => [
[
'name' => 'VITE_APPWRITE_ENDPOINT',
'description' => 'Endpoint of Appwrite server',
'value' => '{apiEndpoint}',
'placeholder' => '{apiEndpoint}',
'required' => true,
'type' => 'text'
],
[
'name' => 'VITE_APPWRITE_PROJECT_ID',
'description' => 'Your Appwrite project ID',
'value' => '{projectId}',
'placeholder' => '{projectId}',
'required' => true,
'type' => 'text'
],
[
'name' => 'VITE_APPWRITE_PROJECT_NAME',
'description' => 'Your Appwrite project name',
'value' => '{projectName}',
'placeholder' => '{projectName}',
'required' => true,
'type' => 'text'
],
]
],
[
'key' => 'starter-for-svelte',
'name' => 'Svelte starter',
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+4 -5
View File
@@ -137,11 +137,11 @@ class Screenshot extends Action
'name' => $template["name"],
'framework' => $framework['key'],
'adapter' => $framework['adapter'],
'buildCommand' => $framework['buildCommand'],
'buildCommand' => $framework['buildCommand'] ?? '',
'buildRuntime' => $framework['buildRuntime'],
'fallbackFile' => $framework['fallbackFile'],
'installCommand' => $framework['installCommand'],
'outputDirectory' => $framework['outputDirectory'],
'fallbackFile' => $framework['fallbackFile'] ?? '',
'installCommand' => $framework['installCommand'] ?? '',
'outputDirectory' => $framework['outputDirectory'] ?? '',
'providerRootDirectory' => $framework['providerRootDirectory'],
'timeout' => 60
]);
@@ -279,7 +279,6 @@ class Screenshot extends Action
foreach ($themes as $theme) {
$file = $client->call(Client::METHOD_GET, '/storage/buckets/screenshots/files/' . $theme['fileId'] . '/download', [
'x-appwrite-project' => 'console',
'x-appwrite-mode' => 'admin',
'cookie' => $cookieConsole
]);