Skip to content

Commit 4477a5b

Browse files
committed
update pnpm usage and documentation
1 parent 55f6030 commit 4477a5b

File tree

12 files changed

+2524
-3378
lines changed

12 files changed

+2524
-3378
lines changed

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
public
4+

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"printWidth": 100,
5+
"trailingComma": "es5"
6+
}

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,21 @@
66

77
<h1>Vite JS Starter with Tailwindcss</h1>
88
<h5>This is a small JS starter which uses Vite and Tailwindcss</h5>
9-
<p>You can use it to quickly test new features locally and also do experiments. The purpose of this starter it's to make super quick all the basic setup needed to use plain JS or packages to add.</p>
9+
<p>You can use it to quickly test new features locally and also do experiments.
10+
The purpose of this starter it's to make super quick all the basic setup needed to use plain JS or packages to add.</p>
11+
12+
### Usage notes
13+
14+
This project uses [`pnpm`](https://pnpm.io) as package manager and enforces its use.
15+
16+
To install dependencies:
17+
18+
```bash
19+
pnpm install
20+
```
21+
22+
To prevent accidental usage of npm or yarn, the project includes a preinstall script using `only-allow`.
23+
If you try to install with another package manager, the process will fail with an informative error.
1024

1125
#### Benefits of using Vite
1226

eslint.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// eslint.config.js
2+
import eslintPluginPrettier from 'eslint-plugin-prettier'
3+
4+
export default [
5+
{
6+
files: ['**/*.js'],
7+
ignores: ['node_modules', 'dist', 'public'],
8+
languageOptions: {
9+
ecmaVersion: 'latest',
10+
sourceType: 'module',
11+
},
12+
plugins: {
13+
prettier: eslintPluginPrettier,
14+
},
15+
rules: {
16+
'no-unused-vars': 'warn',
17+
'no-console': 'off',
18+
'prettier/prettier': 'error',
19+
},
20+
},
21+
]

index.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/js.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="stylesheet" href="./style.css" />
8+
<title>Vite JS Starter</title>
9+
</head>
310

4-
<head>
5-
<meta charset="UTF-8">
6-
<link rel="icon" type="image/svg+xml" href="/js.svg" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<link rel="stylesheet" href="./style.css">
9-
<title>Vite JS Starter</title>
10-
</head>
11-
12-
<body>
13-
<h1 class="text-green-300">Vite JS Starter 🔥</h1>
14-
<script type="module" src="./index.js"></script>
15-
</body>
16-
17-
</html>
11+
<body>
12+
<h1 class="text-green-300">Vite JS Starter 🔥</h1>
13+
<script type="module" src="./index.js"></script>
14+
</body>
15+
</html>

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
console.log('Welcome to Vite JS Starter!');
1+
console.log('Welcome to Vite JS Starter!')

0 commit comments

Comments
 (0)