Skip to content

Commit

Permalink
Change tech stach to Svelte + Vite + Esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
StarLederer committed Feb 13, 2022
1 parent bc3c9a5 commit c3138e4
Show file tree
Hide file tree
Showing 77 changed files with 6,028 additions and 10,560 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: http://EditorConfig.org

# https://github.com/jokeyrhyme/standard-editorconfig

# top-most EditorConfig file
root = true

# defaults
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2
indent_style = space

[*.md]
trim_trailing_whitespace = false
41 changes: 41 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},

env: {
es6: true,
browser: true,
},

extends: ['airbnb-base'],

settings: {
'import/core-modules': ['electron', 'svelte'],
},

overrides: [
// Typescript files
{
files: ['*.ts'],
parserOptions: {
project: './tsconfig.json',
},
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
},
],

rules: {
'no-plusplus': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},

ignorePatterns: ['node_modules/**', '**/dist/**'],
};
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
.github/actions/**/*.js linguist-detectable=false
scripts/*.js linguist-detectable=false
*.config.js linguist-detectable=false
64 changes: 50 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,57 @@
node_modules
.DS_Store
dist/
dist
*.local
*.log
thumbs.db

# Dependency directories
node_modules/
jspm_packages/
.eslintcache

# Yarn Integrity file
.yarn-integrity
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# Other
# File-based project format
*.iws

# Editor-based Rest Client
.idea/httpRequests
/.idea/csv-plugin.xml
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["svelte.svelte-vscode"]
}
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"typescript",
"svelte"
],
"eslint.probe": [
"javascript",
"typescript",
"html",
"markdown",
"svelte"
]
}
39 changes: 0 additions & 39 deletions .yarnclean

This file was deleted.

File renamed without changes.
File renamed without changes
27 changes: 27 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contributing

First and foremost, thank you! We appreciate that you want to contribute to vite-electron-builder, your time is valuable, and your contributions mean a lot to us.

## Issues

Do not create issues about bumping dependencies unless a bug has been identified, and you can demonstrate that it effects this library.

**Help us to help you**

Remember that we’re here to help, but not to make guesses about what you need help with:

- Whatever bug or issue you're experiencing, assume that it will not be as obvious to the maintainers as it is to you.
- Spell it out completely. Keep in mind that maintainers need to think about _all potential use cases_ of a library. It's important that you explain how you're using a library so that maintainers can make that connection and solve the issue.

_It can't be understated how frustrating and draining it can be to maintainers to have to ask clarifying questions on the most basic things, before it's even possible to start debugging. Please try to make the best use of everyone's time involved, including yourself, by providing this information up front._


## Repo Setup
The package manager used to install and link dependencies must be npm v7 or later.

1. Clone repo
1. `npm run watch` start electron app in watch mode.
1. `npm run compile` build app but for local debugging only.
1. `npm run lint` lint your code.
1. `npm run typecheck` Run typescript check.
1. `npm run test` Run app test.
4 changes: 4 additions & 0 deletions electron-vendors.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"chrome": "94",
"node": "16"
}
95 changes: 58 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "metashine",
"version": "1.2.0",
"version": "2.0.0",
"description": "Music meta tag editor",
"repository": "github:HermanLederer/metashine",
"private": true,
"license": "MIT",
"author": {
"name": "Herman Lederer",
Expand All @@ -15,62 +16,82 @@
"editor",
"application"
],
"engines": {
"node": ">=v16.13",
"npm": ">=8.1"
},
"main": "packages/main/dist/index.js",
"scripts": {
"dev": "electron-webpack dev",
"compile": "electron-webpack",
"dist": "yarn compile && electron-builder",
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null",
"release": "yarn compile && electron-builder"
"dev": "node scripts/dev.js",
"build": "cross-env MODE=production node scripts/build.js",
"precompile": "cross-env MODE=production pnpm run build",
"compile": "electron-builder",
"pretest": "npm run build",
"lint": "eslint . --ext js,ts,svelte",
"typecheck-main": "tsc --noEmit -p packages/main/tsconfig.json",
"typecheck-preload": "tsc --noEmit -p packages/preload/tsconfig.json",
"typecheck-renderer": "svelte-check --tsconfig packages/renderer/tsconfig.json",
"typecheck": "npm run typecheck-main && npm run typecheck-preload && npm run typecheck-renderer"
},
"build": {
"appId": "eu.hermanlederer.metashine",
"productName": "Metashine",
"directories": {
"buildResources": "builder"
"buildResources": "buildResources"
},
"win": {
"target": "nsis",
"icon": "512x512.png"
"icon": "icon.png"
},
"nsis": {
"oneClick": false,
"perMachine": true,
"allowToChangeInstallationDirectory": true
},
"linux": {
"target": "deb",
"icon": "icons.icns",
"target": [
{
"target": "deb"
},
{
"target": "pacman"
}
],
"icon": "icon.icns",
"synopsis": "Find, write and format audio meta tags to your liking.",
"category": "AudioVideo"
}
},
"dependencies": {
"electron-updater": "^4.3.8",
"jquery": "^3.6.0",
"music-metadata": "^7.8.4",
"node-id3": "^0.2.2",
"soundcloud.ts": "^0.4.0",
"source-map-support": "^0.5.16",
"spotify-api.js": "^9.0.1"
},
"browserslist": [
"Chrome 94"
],
"devDependencies": {
"@types/jquery": "^3.5.6",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"electron": "11.4.3",
"electron-builder": "^22.4.1",
"electron-webpack": "^2.8.2",
"electron-webpack-ts": "^4.0.1",
"eslint": "^7.24.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-airbnb-typescript": "^14.0.0",
"eslint-config-prettier": "^8.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.4.0",
"node-sass": "^6.0.1",
"prettier": "^2.3.2",
"sass-loader": "^10",
"typescript": "^4.2.4",
"webpack": "~4.42.1"
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.37",
"@tsconfig/svelte": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"cross-env": "^7.0.3",
"electron": "15.3.1",
"electron-builder": "22.13.1",
"esbuild": "^0.14.21",
"eslint": "^8.9.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-svelte3": "^3.4.0",
"sass": "^1.49.7",
"svelte": "^3.46.4",
"svelte-check": "^2.4.3",
"svelte-preprocess": "^4.10.3",
"tslib": "^2.3.1",
"tsup": "^5.11.13",
"typescript": "^4.5.5",
"vite": "^2.8.1"
},
"dependencies": {
"electron-updater": "4.6.2",
"music-metadata": "^7.11.8",
"node-id3": "^0.2.3",
"soundcloud.ts": "^0.4.5",
"spotify-api.js": "^9.0.3"
}
}
File renamed without changes.
Loading

0 comments on commit c3138e4

Please sign in to comment.