Skip to content

Commit

Permalink
Test with project template
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinLinde committed Jul 18, 2024
1 parent 6c33b99 commit 729aeda
Show file tree
Hide file tree
Showing 36 changed files with 6,431 additions and 7 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Project Template

on:
push:
branches: [main]
paths:
- "website/**"

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
check-latest: true

- name: Install NPM package
run: npm install
working-directory: website

- name: Build website
run: npm run build
working-directory: website

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.6.0
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: "website/build" # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch

31 changes: 31 additions & 0 deletions .github/workflows/website_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Website CI

on:
push:
branches-ignore:
- "main"
paths:
- "website/**"
pull_request:
paths-ignore:
- "**.md"
- ".vscode/"
paths:
- "website/**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
working-directory: website
- name: Build website
run: npm run build
working-directory: website
14 changes: 7 additions & 7 deletions notebooks/concept_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 103,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -27,7 +27,7 @@
},
{
"cell_type": "code",
"execution_count": 104,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 105,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -60,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 106,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 107,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -125,7 +125,7 @@
},
{
"cell_type": "code",
"execution_count": 108,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -147,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 109,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down
21 changes: 21 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules

# Output
.output
.vercel
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions website/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 4 additions & 0 deletions website/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
8 changes: 8 additions & 0 deletions website/.prettierrc
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" } }]
}
38 changes: 38 additions & 0 deletions website/README.md
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
```

## 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.
33 changes: 33 additions & 0 deletions website/eslint.config.js
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.FlatConfig[]} */
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/']
}
];
Loading

0 comments on commit 729aeda

Please sign in to comment.