-
Notifications
You must be signed in to change notification settings - Fork 9
Create svelte project and build it using play for deployment #19
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
50fca75
create sveltekit project
ken-zlai 04305fc
use adapter-static for build
ken-zlai c800750
get a play build working with output from npm run build
ken-zlai 39c16ed
remove all previous build assets
ken-zlai 5d4e119
ignore build assets from the frontend
ken-zlai ee8a3f7
make the webservice build the frontend before serving the assets
ken-zlai b0e7848
move frontend .gitignore stuff to the base of the repo
ken-zlai bc86daf
Merge branch 'main' into ken-websvc
ken-zlai 32de32b
make sure to use hub instead of webservice name
ken-zlai d198c47
use npm ci instead of npm install
ken-zlai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| engine-strict=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Package Managers | ||
| package-lock.json | ||
| pnpm-lock.yaml | ||
| yarn.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "useTabs": true, | ||
| "singleQuote": true, | ||
| "trailingComma": "none", | ||
| "printWidth": 100, | ||
| "plugins": ["prettier-plugin-svelte"], | ||
| "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # create-svelte | ||
|
|
||
| Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). | ||
|
|
||
| ## Creating a project | ||
|
|
||
| If you're seeing this, you've probably already done this step. Congrats! | ||
|
|
||
| ```bash | ||
| # create a new project in the current directory | ||
| npm create svelte@latest | ||
|
|
||
| # create a new project in my-app | ||
| npm create svelte@latest my-app | ||
| ``` | ||
|
|
||
| ## Developing | ||
|
|
||
| Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
|
|
||
| # or start the server and open the app in a new browser tab | ||
| npm run dev -- --open | ||
| ``` | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Building | ||
|
|
||
| To create a production version of your app: | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| You can preview the production build with `npm run preview`. | ||
|
|
||
| > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. | ||
ken-zlai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import js from '@eslint/js'; | ||
| import ts from 'typescript-eslint'; | ||
| import svelte from 'eslint-plugin-svelte'; | ||
| import prettier from 'eslint-config-prettier'; | ||
| import globals from 'globals'; | ||
|
|
||
| /** @type {import('eslint').Linter.Config[]} */ | ||
| export default [ | ||
| js.configs.recommended, | ||
| ...ts.configs.recommended, | ||
| ...svelte.configs['flat/recommended'], | ||
| prettier, | ||
| ...svelte.configs['flat/prettier'], | ||
| { | ||
| languageOptions: { | ||
| globals: { | ||
| ...globals.browser, | ||
| ...globals.node | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| files: ['**/*.svelte'], | ||
| languageOptions: { | ||
| parserOptions: { | ||
| parser: ts.parser | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| ignores: ['build/', '.svelte-kit/', 'dist/'] | ||
| } | ||
| ]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.