Skip to content

Commit 5e10813

Browse files
Add Makefile to auto organize build artifacts
1 parent e0542f0 commit 5e10813

29 files changed

+5876
-5858
lines changed

.eslintrc.json

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
{
2-
"extends": [
3-
"eslint:recommended",
4-
"plugin:@typescript-eslint/recommended",
5-
"prettier"
6-
],
7-
"parser": "@typescript-eslint/parser",
8-
"plugins": ["@typescript-eslint"],
9-
"parserOptions": {
10-
"project": ["./tsconfig.json"]
11-
},
12-
"root": true,
13-
"ignorePatterns": "*.config.js",
14-
"rules": {
15-
"camelcase": "warn",
16-
"complexity": ["error", 10],
17-
"consistent-return": "warn",
18-
"curly": "warn",
19-
"dot-notation": "warn",
20-
"eqeqeq": "error",
21-
"max-depth": "error",
22-
"no-alert": "warn",
23-
"no-console": ["error", { "allow": ["error"] }]
24-
}
25-
}
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier"
6+
],
7+
"parser": "@typescript-eslint/parser",
8+
"plugins": ["@typescript-eslint"],
9+
"parserOptions": {
10+
"project": ["./tsconfig.json"]
11+
},
12+
"root": true,
13+
"ignorePatterns": "*.config.js",
14+
"rules": {
15+
"camelcase": "warn",
16+
"complexity": ["error", 10],
17+
"consistent-return": "warn",
18+
"curly": "warn",
19+
"dot-notation": "warn",
20+
"eqeqeq": "error",
21+
"max-depth": "error",
22+
"no-alert": "warn",
23+
"no-console": ["error", { "allow": ["error"] }]
24+
}
25+
}

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
node_modules
2-
dist
3-
config.json
1+
node_modules
2+
dist
3+
config.json
44
.env

.vscode/extensions.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{
2-
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3-
}
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

.vscode/settings.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
{
2-
"files.associations": {
3-
"*.css": "tailwindcss"
4-
},
5-
"emmet.includeLanguages": {
6-
"javascriptreact": "html",
7-
"typescriptreact": "html"
8-
},
9-
"editor.codeActionsOnSave": {
10-
"source.organizeImports": "never"
11-
},
12-
"tailwindCSS.experimental.classRegex": [
13-
["cva\\(([\\s\\S]*?)\\},?[\\s]*?\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
14-
],
15-
"files.exclude": {
16-
// "node_modules": true
17-
}
18-
}
1+
{
2+
"files.associations": {
3+
"*.css": "tailwindcss"
4+
},
5+
"emmet.includeLanguages": {
6+
"javascriptreact": "html",
7+
"typescriptreact": "html"
8+
},
9+
"editor.codeActionsOnSave": {
10+
"source.organizeImports": "never"
11+
},
12+
"tailwindCSS.experimental.classRegex": [
13+
["cva\\(([\\s\\S]*?)\\},?[\\s]*?\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
14+
],
15+
"files.exclude": {
16+
// "node_modules": true
17+
}
18+
}

Makefile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
OUT_DIR=/src-tauri/target/release/bundle
2+
3+
all: printy
4+
printy:
5+
pnpm tauri build
6+
for dir in "msi" "nsis"; \
7+
do \
8+
ls $(OUT_DIR)/$$dir p \
9+
| grep v / \
10+
| grep oE "[0-9]+\.[0-9]+\.[0-9]+" \
11+
| uniq \
12+
| while read r line; \
13+
do \
14+
mkdir p "$(OUT_DIR)/$$dir/$$line"; \
15+
find $(OUT_DIR)/$$dir name "*$$line*" -type f \
16+
| xargs I % mv % "$(OUT_DIR)/$$dir/$$line"; \
17+
done; \
18+
done;

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# Tauri + Solid + Typescript + Tailwind
2-
3-
This template should help get you started developing with Tauri, Solid, Typescript and TailwindCSS in Vite.
4-
5-
This also includes ESLint, PostCSS, Prettier and some of the Rust crates I use most often
6-
7-
## Usage
8-
9-
1. Clone the repo by running `git clone git@github.com:escritorio-gustavo/tauri-bootstrap.git`
10-
1. Run `mv tauri-bootstrap <NEW_NAME>` to rename the directory
11-
1. Open the project directory in your editor of choice (in VS Code's case, run `code <NEW_NAME>`)
12-
1. Replace all instances of `{{app_name}}` by the name of your project. They will be in the files:
13-
- `package.json`
14-
- `src-tauri/Cargo.toml`
15-
- `src-tauri/Cargo.lock`
16-
- `src-tauri/tauri.conf.json`
17-
1. Run `pnpm install` (or `pnpm update` to get the current versions of the packages)
18-
1. Run `pnpm tauri dev`
19-
20-
## Recommended IDE Setup
21-
22-
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
1+
# Tauri + Solid + Typescript + Tailwind
2+
3+
This template should help get you started developing with Tauri, Solid, Typescript and TailwindCSS in Vite.
4+
5+
This also includes ESLint, PostCSS, Prettier and some of the Rust crates I use most often
6+
7+
## Usage
8+
9+
1. Clone the repo by running `git clone git@github.com:escritorio-gustavo/tauri-bootstrap.git`
10+
1. Run `mv tauri-bootstrap <NEW_NAME>` to rename the directory
11+
1. Open the project directory in your editor of choice (in VS Code's case, run `code <NEW_NAME>`)
12+
1. Replace all instances of `{{app_name}}` by the name of your project. They will be in the files:
13+
- `package.json`
14+
- `src-tauri/Cargo.toml`
15+
- `src-tauri/Cargo.lock`
16+
- `src-tauri/tauri.conf.json`
17+
1. Run `pnpm install` (or `pnpm update` to get the current versions of the packages)
18+
1. Run `pnpm tauri dev`
19+
20+
## Recommended IDE Setup
21+
22+
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)

index.html

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<!doctype html>
2-
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<meta name="theme-color" content="#000000" />
7-
<link rel="icon" type="image/svg+xml" href="/src/assets/logo.svg" />
8-
<title>Tauri + Solid + Typescript App</title>
9-
</head>
10-
11-
<body>
12-
<noscript>You need to enable JavaScript to run this app.</noscript>
13-
<div id="root"></div>
14-
15-
<script src="/src/index.tsx" type="module"></script>
16-
</body>
17-
</html>
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="theme-color" content="#000000" />
7+
<link rel="icon" type="image/svg+xml" href="/src/assets/logo.svg" />
8+
<title>Tauri + Solid + Typescript App</title>
9+
</head>
10+
11+
<body>
12+
<noscript>You need to enable JavaScript to run this app.</noscript>
13+
<div id="root"></div>
14+
15+
<script src="/src/index.tsx" type="module"></script>
16+
</body>
17+
</html>

postcss.config.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
export default {
2-
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
5-
},
6-
}
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

prettier.config.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
/** @type {import("prettier").Config} */
2-
export default {
3-
plugins: ['prettier-plugin-tailwindcss'],
4-
arrowParens: 'avoid',
5-
semi: false,
6-
singleQuote: true,
7-
trailingComma: 'all',
8-
jsxSingleQuote: false,
9-
useTabs: false,
10-
tabWidth: 2,
11-
}
1+
/** @type {import("prettier").Config} */
2+
export default {
3+
plugins: ['prettier-plugin-tailwindcss'],
4+
arrowParens: 'avoid',
5+
semi: false,
6+
singleQuote: true,
7+
trailingComma: 'all',
8+
jsxSingleQuote: false,
9+
useTabs: false,
10+
tabWidth: 2,
11+
}

public/tauri.svg

+6-6
Loading

src-tauri/.gitignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Cargo
2-
# will have compiled files and executables
3-
/target/
4-
/download/
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
/target/
4+
/download/

0 commit comments

Comments
 (0)