Skip to content

Commit

Permalink
Add vite project with example app for development
Browse files Browse the repository at this point in the history
  • Loading branch information
webair committed Apr 12, 2024
0 parents commit 606010c
Show file tree
Hide file tree
Showing 12 changed files with 16,598 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"root": true,
"env": {
"node": true,
"vue/setup-compiler-macros": true
},
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser"
},
"plugins": [
"@typescript-eslint",
"prettier",
"import"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "never"
}
]
},
"overrides": [
{
"files": ["*.vue","*.ts", "*.js", "*.mjs"]
}
],
"ignorePatterns": ["node_modules", "dist", "coverage"],
"settings": {
"import/internal-regex": "^@/"
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.12.0
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# vite-plugin-vue-examples

## Development

Install nvm [https://github.com/nvm-sh/nvm#installing-and-updating](https://github.com/nvm-sh/nvm#installing-and-updating)

Install and initialize node with version used in project
```
nvm install
npm install
```

Run example app locally
```
npm run dev
```

Build app locally (bundle will be created in `/dist` folder)
```
npm run build
```

Check code format issues
```
npm run lint
```

Fix automatically fixable format/lint issues
```
npm run fix
```

Check typescript types
```
npm run check-types
```

Run vitest test runner in watch mode
```
npm run test
```

Check format/lint issues, typescript types and run tests
```
npm run verify
```

### Dependencies

Check for updated dependencies
```
npx npm-check-updates
```

Update version in package.json
```
npx npm-check-updates -u
```

Updated modules and package-lock file
```
npm update
```
3 changes: 3 additions & 0 deletions example/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h1>Example App for vite-plugin-vue-examples</h1>
</template>
4 changes: 4 additions & 0 deletions example/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite Plugin Vue Examples</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="example/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 606010c

Please sign in to comment.