{"id":16768918,"url":"https://github.com/phptuts/sappertypescriptstart","last_synced_at":"2025-04-05T07:23:07.510Z","repository":{"id":42932489,"uuid":"238760767","full_name":"phptuts/sappertypescriptstart","owner":"phptuts","description":"To help people get started with sapper and typescript","archived":false,"fork":false,"pushed_at":"2023-01-05T06:37:45.000Z","size":610,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T15:14:19.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phptuts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-06T18:53:19.000Z","updated_at":"2021-12-24T14:33:17.000Z","dependencies_parsed_at":"2023-02-03T16:15:14.184Z","dependency_job_id":null,"html_url":"https://github.com/phptuts/sappertypescriptstart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phptuts%2Fsappertypescriptstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phptuts%2Fsappertypescriptstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phptuts%2Fsappertypescriptstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phptuts%2Fsappertypescriptstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phptuts","download_url":"https://codeload.github.com/phptuts/sappertypescriptstart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247301479,"owners_count":20916517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T06:12:53.065Z","updated_at":"2025-04-05T07:23:07.489Z","avatar_url":"https://github.com/phptuts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sappper Typescript Template \n\nAll the credit and hard work came from this repo:\nhttps://github.com/pyoner/svelte-typescript\n\n## Install\n\n```\nnpm install -g degit\ndegit github:phptuts/sappertypescriptstart my-app\ncd my-app\ncp .env-template .env\nnpm install\nnpm run dev\n```\n\nOnce it loads you should see this in the terminal console and browser console.  This means the environment variables are loading.\n\n```console\nENVIRONMENT VARIABLES WORKING\nDOES NOT EXIST.\n```\n\n## Typescript on components\n\nThis is required for visual code.\n\n```typescript\n\u003cscript lang=\"typescript\"\u003e\u003c/script\u003e\n```\n\n## Environment Variables\n\nSet your environment variables in the .env file.  To access them use env.ts function / service.  There is an example in the index.svelte component.\n\n```typescript\n\u003cscript lang=\"typescript\"\u003e\n  import { onMount } from \"svelte\";\n  import { getEnvParam } from \"../services/env\";\n\n  // Server Side\n  console.log(getEnvParam(\"TEST\", \"Environment variables not working.\"));\n  console.log(getEnvParam(\"BAD_ENV\", \"DOES NOT EXIST.\"));\n\n  onMount(() =\u003e {\n    // Client Side\n    console.log(\"App mounted\");\n    console.log(getEnvParam(\"TEST\", \"Environment variables not working.\"));\n    console.log(getEnvParam(\"BAD_ENV\", \"DOES NOT EXIST.\"));\n  });\n\u003c/script\u003e\n\n\u003csvelte:head\u003e\n  \u003ctitle\u003eSapper project template\u003c/title\u003e\n\u003c/svelte:head\u003e\n\n\u003ch1\u003eTypescript Envs\u003c/h1\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphptuts%2Fsappertypescriptstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphptuts%2Fsappertypescriptstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphptuts%2Fsappertypescriptstart/lists"}