Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert from vue-cli to vite #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ yarn-error.log*
*.sw?

commit.sh
package-lock.json
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If you like bright and fresh colors, you will love this Free Tailwind CSS Templa
- (If you are on a linux based terminal) Simply run `npm run install:clean`
- (If not) Run in terminal `npm install`
- (If not) Run in terminal `npm run build:tailwind` (each time you add a new class, a class that does not exist in `src/assets/styles/tailwind.css`, you will need to run this command)
- (If not) Run in terminal `npm run build`
- (If not) Run in terminal `npm run serve`
- Navigate to https://localhost:8080
- Check more about [Tailwind CSS](https://tailwindcss.com/?ref=creativetim)
Expand Down Expand Up @@ -118,11 +119,12 @@ vue-notus
├── ISSUE_TEMPLATE.md
├── LICENSE.md
├── README.md
├── babel.config.js
├── vite.config.js
├── package.json
├── index.html
├── public
│   ├── favicon.ico
│   └── index.html
│   └── apple-icon.png
├── src
│   ├── App.vue
│   ├── assets
Expand Down
6 changes: 3 additions & 3 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="shortcut icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="shortcut icon" href="/favicon.ico" />
<link
rel="apple-touch-icon"
sizes="76x76"
href="<%= BASE_URL %>apple-icon.png"
href="/apple-icon.png"
/>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script>
<title>
Expand All @@ -40,6 +40,6 @@
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script type="module" src="/src/main.js"></script>
</html>
49 changes: 20 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,41 @@
"repository": "https://github.com/creativetimofficial/vue-notus",
"license": "MIT",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build && gulp licenses",
"lint": "vue-cli-service lint",
"serve": "vite preview",
"build": "vite build && gulp licenses",
"build:tailwind": "tailwind build src/assets/styles/index.css -o src/assets/styles/tailwind.css",
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm run build:tailwind && npm run serve"
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm run build:tailwind && npm run build && npm run serve",
"dev": "vite"
},
"dependencies": {
"@fortawesome/fontawesome-free": "5.15.3",
"@popperjs/core": "2.9.1",
"@tailwindcss/forms": "0.2.1",
"@vue/compiler-sfc": "3.0.7",
"@fortawesome/fontawesome-free": "^5.15.4",
"@popperjs/core": "2.11.6",
"@tailwindcss/forms": "0.5.3",
"chart.js": "2.9.4",
"core-js": "3.9.1",
"gulp": "4.0.2",
"gulp-append-prepend": "1.0.8",
"tailwindcss": "2.0.4",
"vue": "3.0.7",
"vue-router": "4.0.5"
"gulp": "^4.0.2",
"gulp-append-prepend": "1.0.9",
"tailwindcss": "^3.2.4",
"vue": "3.2.45",
"vue-router": "4.1.6"
},
"devDependencies": {
"@babel/core": "7.13.10",
"@babel/eslint-parser": "7.13.10",
"@vue/cli-plugin-babel": "5.0.0-alpha.7",
"@vue/cli-plugin-eslint": "5.0.0-alpha.7",
"@vue/cli-service": "5.0.0-alpha.7",
"autoprefixer": "10.2.5",
"eslint": "7.22.0",
"eslint-plugin-vue": "7.7.0",
"postcss": "8.2.8",
"vue-template-compiler": "2.6.12"
"@vitejs/plugin-vue": "^3.2.0",
"autoprefixer": "10.4.13",
"eslint": "^8.29.0",
"eslint-plugin-vue": "^8.7.1",
"postcss": "8.4.19",
"vite": "^3.2.4"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
"es2021": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "@babel/eslint-parser"
}
"rules": {}
},
"postcss": {
"plugins": {
Expand Down
14 changes: 14 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

const path = require("path");

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
})