Skip to content

Commit

Permalink
Initialise project
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfieZero committed Sep 5, 2023
0 parents commit 6425703
Show file tree
Hide file tree
Showing 57 changed files with 15,512 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
89 changes: 89 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
module.exports = {
env: {
es2021: true,
},
extends: [
'xo',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/strict',
'plugin:@typescript-eslint/stylistic',
'prettier',
],
ignorePatterns: ['dist/**/*.js', 'out/**/*.js'],
overrides: [
{
env: {
browser: true,
},
extends: ['xo/browser', 'plugin:react/recommended', 'plugin:jsx-a11y/strict', 'prettier'],
plugins: ['react', 'jsx-a11y'],
files: ['src/renderer/**/*.{tsx,*ts}'],
rules: {
'react/react-in-jsx-scope': 'off',
},
},
{
env: {
node: true,
},
files: [
'.eslintrc.js',
'.prettierrc.cjs',
'forge.config.cjs',
'jest.config.cjs',
'postcss.config.cjs',
'tailwind.config.cjs',
'vite.main.config.cjs',
'vite.preload.config.cjs',
'vite.renderer.config.cjs',
'src/main/**/*.{tsx,*ts}',
],
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
globals: {
JSX: 'readonly',
},
plugins: ['import', 'unicorn', '@typescript-eslint', 'prettier'],
root: true,
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: 'tsconfig.json',
},
},
react: {
version: 'detect',
},
},
rules: {
'no-console': ['error', { allow: ['info', 'warn', 'error', 'debug', 'table'] }],
'unicorn/prefer-module': 'off',
'unicorn/filename-case': [
'error',
{
cases: {
kebabCase: true,
pascalCase: true,
},
},
],
'unicorn/prevent-abbreviations': [
'warn',
{
replacements: {
props: false,
env: false,
},
},
],
},
};
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
push:
tags:
- 'v*'

jobs:
release:
permissions: write-all
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: dependencies
run: npm ci
- name: lint
run: npm run lint
- name: test
run: npm test
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run publish
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test
on:
push:
paths:
- 'src/**'
tags:
- '!v*'
branches:
- 'main'
pull_request:
paths:
- 'src/**'

jobs:
tests:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: dependencies
run: npm ci
- name: lint
run: npm run lint
- name: test
run: npm test
92 changes: 92 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Webpack
.webpack/

# Vite
.vite/

# Electron-Forge
out/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
23 changes: 23 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* eslint-env node */

module.exports = {
printWidth: 120,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
trailingComma: 'es5',
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'avoid',
requirePragma: false,
insertPragma: false,
proseWrap: 'preserve',
htmlWhitespaceSensitivity: 'css',
vueIndentScriptAndStyle: false,
endOfLine: 'lf',
plugins: ['prettier-plugin-tailwindcss'],
tailwindConfig: './tailwind.config.cjs',
};
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"typescript.format.enable": false
}
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright © 2023 Neil Sweeney <neil@enhko.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Seilf

Bookmark manager for your OS tray

## Uses

- [Electron][1]
- [Electron Forge][4]
- [React][2]
- [Tailwinds CSS][3]
- [Vite][5]
- [TypeScript][6]

[1]: https://www.electronjs.org
[2]: https://react.dev
[3]: https://tailwindcss.com
[4]: https://www.electronforge.io
[5]: https://vitejs.dev
[6]: https://www.typescriptlang.org
62 changes: 62 additions & 0 deletions forge.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
packagerConfig: {
icon: './src/assets/app',
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
plugins: [
{
name: '@electron-forge/plugin-vite',
config: {
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
// If you are familiar with Vite configuration, it will look really familiar.
build: [
{
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
entry: 'src/main/main.ts',
config: 'vite.main.config.mjs',
},
{
entry: 'src/preload.ts',
config: 'vite.preload.config.mjs',
},
],
renderer: [
{
name: 'main_window',
config: 'vite.renderer.config.mjs',
},
],
},
},
],
publishers: [
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'WolfieZero',
name: 'seilf',
},
draft: true,
},
},
],
};

0 comments on commit 6425703

Please sign in to comment.