Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Moved from other private repository, after wiping out old history.
  • Loading branch information
lasuillard committed Oct 8, 2023
0 parents commit 7f7e346
Show file tree
Hide file tree
Showing 111 changed files with 13,298 additions and 0 deletions.
1 change: 1 addition & 0 deletions .checkov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skip-check:
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "lasuillard/raindrop-sync-chrome",
"dockerComposeFile": ["../docker-compose.yml", "./docker-compose.override.yaml"],
"runServices": ["workspace", "display", "novnc"],
"service": "workspace",
"overrideCommand": true,
"initializeCommand": "./.devcontainer/initializeCommand.sh",
"onCreateCommand": "./.devcontainer/onCreateCommand.sh",
"updateContentCommand": "./.devcontainer/updateContentCommand.sh",
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
"postStartCommand": "./.devcontainer/postStartCommand.sh",
"postAttachCommand": "./.devcontainer/postAttachCommand.sh",
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspaces/raindrop-sync-chrome",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ldez.ignore-files",
"gruntfuggly.todo-tree",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig",
"GraphQL.vscode-graphql-syntax",
"svelte.svelte-vscode",
"bradlc.vscode-tailwindcss",
"ZixuanChen.vitest-explorer",
"vivaxy.vscode-conventional-commits"
]
}
}
}
41 changes: 41 additions & 0 deletions .devcontainer/docker-compose.override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3'

volumes:
# NOTE: In host environment, X11 sockets will be created repeatedly on automatic X11 forwarding by Devcontainers
# thus sometimes host' display might not be accessible using :0
X11:

services:
workspace:
build:
args:
WORKSPACE: /workspaces/raindrop-sync-chrome
volumes:
- .:/workspaces/raindrop-sync-chrome
- X11:/tmp/.X11-unix
environment:
DISPLAY: ':${DISPLAY_NUM:-13}'
healthcheck:
disable: true

display:
image: ghcr.io/dtinth/xtigervnc-docker:main
volumes:
- X11:/tmp/.X11-unix
environment:
VNC_GEOMETRY: 1440x900
VNC_DISPLAY: ':${DISPLAY_NUM:-13}'
expose:
- '59${DISPLAY_NUM:-13}'
- 6000
command:
- bash
- -c
- |
Xtigervnc -desktop "$${VNC_DESKTOP_NAME}" -geometry "$${VNC_GEOMETRY}" -listen tcp -ac -SecurityTypes None -AlwaysShared -AcceptKeyEvents -AcceptPointerEvents -SendCutText -AcceptCutText "$${VNC_DISPLAY}"
novnc:
image: geek1011/easy-novnc:1.1.0
ports:
- ${NOVNC_PORT:-5800}:5800
command: -a :5800 -h display --no-url-password --port "59${DISPLAY_NUM:-13}"
9 changes: 9 additions & 0 deletions .devcontainer/initializeCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

hooks_dir='./.devcontainer/initializeCommand'

# Run user hook scripts
if [ -d "${hooks_dir}" ]
then
find "${hooks_dir}" -maxdepth 1 -type f -name '*.sh' -exec "{}" \;
fi
17 changes: 17 additions & 0 deletions .devcontainer/onCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

hooks_dir='./.devcontainer/onCreateCommand'

sudo apt update && sudo apt install -y bash-completion

echo '
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
' >> ~/.bashrc

# Run user hook scripts
if [ -d "${hooks_dir}" ]
then
find "${hooks_dir}" -maxdepth 1 -type f -name '*.sh' -exec "{}" \;
fi
11 changes: 11 additions & 0 deletions .devcontainer/postAttachCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

hooks_dir='./.devcontainer/postAttachCommand'

git fetch --all

# Run user hook scripts
if [ -d "${hooks_dir}" ]
then
find "${hooks_dir}" -maxdepth 1 -type f -name '*.sh' -exec "{}" \;
fi
11 changes: 11 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

hooks_dir='./.devcontainer/postCreateCommand'

make init

# Run user hook scripts
if [ -d "${hooks_dir}" ]
then
find "${hooks_dir}" -maxdepth 1 -type f -name '*.sh' -exec "{}" \;
fi
9 changes: 9 additions & 0 deletions .devcontainer/postStartCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

hooks_dir='./.devcontainer/postStartCommand'

# Run user hook scripts
if [ -d "${hooks_dir}" ]
then
find "${hooks_dir}" -maxdepth 1 -type f -name '*.sh' -exec "{}" \;
fi
9 changes: 9 additions & 0 deletions .devcontainer/updateContentCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

hooks_dir='./.devcontainer/updateContentCommand'

# Run user hook scripts
if [ -d "${hooks_dir}" ]
then
find "${hooks_dir}" -maxdepth 1 -type f -name '*.sh' -exec "{}" \;
fi
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**

# Allowed things
!scripts/**
!src/**
!static/**
!.npmrc
!package-lock.json
!package.json
!postcss.config.js
!requirements.txt
!svelte.config.js
!tailwind.config.js
!tsconfig.json
!vite.config.ts

# Extra exclude from allowed things
**/*~
**/*.log
**/.DS_Store
**/Thumbs.db
**/*.test.*
**/*.md
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html,css,scss,json,yaml,yml,js,jsx,ts,tsx}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Dockerfile]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/dist
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
34 changes: 34 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier',
'plugin:jsdoc/recommended-typescript'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jsdoc'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
],
globals: {
chrome: 'readonly'
}
};
Loading

0 comments on commit 7f7e346

Please sign in to comment.