Skip to content

Commit

Permalink
feat: upgrade tailwind & eslint to lastest version (#33)
Browse files Browse the repository at this point in the history
* upgrade tailwind & eslint

* fix

* improve code

* fix ui

---------

Co-authored-by: Atipat Pankong <[email protected]>
  • Loading branch information
JAmoMES and Atipat Pankong authored Jun 23, 2024
1 parent f8cffbf commit 4841022
Show file tree
Hide file tree
Showing 30 changed files with 2,062 additions and 1,993 deletions.
7 changes: 0 additions & 7 deletions .editorconfig

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

5 changes: 1 addition & 4 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"src/**/*.{js,vue}": [
"prettier --write",
"eslint --fix"
]
"src/**/*.{js,vue}": ["prettier --write", "eslint --fix"]
}
5 changes: 1 addition & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"importOrder": ["^@app/(.*)$", "^[./]"],
"importOrderSeparation": true,
"experimentalBabelParserPluginsList": ["jsx", "typescript"]
"singleQuote": true
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# KU-TABLE

ตารางเรียนที่อยากได้จากเว็บ KU<br>
เซฟตารางไปใช้ได้เลยครับ 🤝🏻

Expand All @@ -23,13 +24,15 @@ https://ku-table.vercel.app
[![Star on GitHub](https://img.shields.io/github/stars/Noboomta/schedule-ku.svg?style=social&label=Stars)](https://github.com/auxilincom/docker-compose-starter/stargazers)

### หมายเหตุ

ทาง dev ไม่มีการเก็บค่า username password และไม่มีตังจ่ายค่า server database<br>
มีเพียงการนับจำนวนคนใช้งานผ่านการเก็บ cache stdId มีการ log ชั้นปีและคณะของผู้ใช้งานเพื่อทราบกลุ่มผู้ใช้<br>
ตรวจสอบโค้ดได้ที่ https://github.com/Noboomta/KU-Table-server <br>
จุดประสงค์ของ dev อยากให้มี ตารางเรียน บนหน้าเว็บของมหาลัย ไม่ได้มีเจตนาหาผลประโยชน์ใดๆจากผู้ใช้<br>
ทาง dev ยินดีให้โค้ดทั้งหมดแก่มหาลัยเพียงทำตาม <strong>Getting started with this app.</strong><br>

### ที่มาข้อมูล

https://www.ku.ac.th/th/bachelor-degree <br>
https://registrar.ku.ac.th/cur/all <br>
[https://registrar.ku.ac.th/wp-content/uploads/2017/...](https://registrar.ku.ac.th/wp-content/uploads/2017/05/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9B%E0%B8%A3%E0%B8%B1%E0%B8%9A%E0%B8%9B%E0%B8%A3%E0%B8%B8%E0%B8%87%E0%B8%AB%E0%B8%A1%E0%B8%A7%E0%B8%94%E0%B8%A7%E0%B8%B4%E0%B8%8A%E0%B8%B2%E0%B8%A8%E0%B8%B6%E0%B8%81%E0%B8%A9%E0%B8%B2%E0%B8%97%E0%B8%B1%E0%B9%88%E0%B8%A7%E0%B9%84%E0%B8%9B-2564-%E0%B8%AA%E0%B8%A0%E0%B8%B2-%E0%B8%A1%E0%B8%81.-%E0%B8%AD.pdf) <br>
Expand Down Expand Up @@ -68,20 +71,25 @@ VUE_APP_BASE_SERVER_URL=https://<your-server-domain>
```

### Compiles and hot-reloads for development

```
yarn dev
```

the applciation will run at [localhost:8080](http://localhost:8080)

### Compiles and minifies for production

```
yarn build
```

### Lints and fixes files

```
yarn lint
```

### Customize configuration

See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const globals = require('globals')
const js = require('@eslint/js')

const { FlatCompat } = require('@eslint/eslintrc')

const { includeIgnoreFile } = require('@eslint/compat')
const pluginVue = require('eslint-plugin-vue')

const path = require('node:path')
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})
const gitignorePath = path.resolve(__dirname, '.gitignore')

module.exports = [
includeIgnoreFile(gitignorePath),
...compat.extends('eslint:recommended', 'prettier'),
...pluginVue.configs['flat/recommended'],
{
files: ['src/**/*.(js|vue)'],
languageOptions: {
globals: {
...globals.node,
},
},
rules: {},
},
]
138 changes: 69 additions & 69 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
<!DOCTYPE html>
<!doctype html>
<html lang="">
<head>
<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="icon" href="/favicon.ico" />
<head>
<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="icon" href="/favicon.ico" />

<!-- HTML Meta Tags -->
<title>ku-table</title>
<meta name="description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<!-- HTML Meta Tags -->
<title>ku-table</title>
<meta name="description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />

<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="ku-table" />
<meta itemprop="description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<meta
itemprop="image"
content="https://raw.githubusercontent.com/Noboomta/schedule-ku/main/src/assets/ku-table-horizontal.jpg"
/>
<meta name="google-site-verification" content="UExGK20mIFc77o23eFMBq9jM7IhiEiDxZPh8kJbX-A4" />
<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="ku-table" />
<meta itemprop="description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<meta
itemprop="image"
content="https://raw.githubusercontent.com/Noboomta/schedule-ku/main/src/assets/ku-table-horizontal.jpg"
/>
<meta name="google-site-verification" content="UExGK20mIFc77o23eFMBq9jM7IhiEiDxZPh8kJbX-A4" />

<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://ku-table.vercel.app" />
<meta property="og:type" content="website" />
<meta property="og:title" content="ku-table" />
<meta property="og:description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<meta
property="og:image"
content="https://raw.githubusercontent.com/Noboomta/schedule-ku/main/src/assets/ku-table-horizontal.jpg"
/>
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://ku-table.vercel.app" />
<meta property="og:type" content="website" />
<meta property="og:title" content="ku-table" />
<meta property="og:description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<meta
property="og:image"
content="https://raw.githubusercontent.com/Noboomta/schedule-ku/main/src/assets/ku-table-horizontal.jpg"
/>

<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="ku-table" />
<meta name="twitter:description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<meta
name="twitter:image"
content="https://raw.githubusercontent.com/Noboomta/schedule-ku/main/src/assets/ku-table-horizontal.jpg"
/>
<!-- Meta Tags Generated via http://heymeta.com -->
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="ku-table" />
<meta name="twitter:description" content="KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku" />
<meta
name="twitter:image"
content="https://raw.githubusercontent.com/Noboomta/schedule-ku/main/src/assets/ku-table-horizontal.jpg"
/>
<!-- Meta Tags Generated via http://heymeta.com -->

<meta name="google-site-verification" content="75eohuKjDd-_6O0q1bYRflvZg6oJdhYa_JnC8kVFw7s" />
<meta name="google-site-verification" content="75eohuKjDd-_6O0q1bYRflvZg6oJdhYa_JnC8kVFw7s" />

<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6332996084759514"
crossorigin="anonymous"
></script>
</head>
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6332996084759514"
crossorigin="anonymous"
></script>
</head>

<body>
<noscript>
<strong>KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku</strong>
</noscript>
<div id="app"></div>
<body>
<noscript>
<strong>KU-Table ตารางเรียนของนิสิต KU ที่อยากให้มีใน myku</strong>
</noscript>
<div id="app"></div>

<script type="module" src="src/main.js"></script>
<!-- built files will be auto injected -->
<div id="divadsensedisplaynone">
<!-- put here all adsense code -->
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6332996084759514"
crossorigin="anonymous"
></script>
<script type="module" src="src/main.js"></script>
<!-- built files will be auto injected -->
<div id="divadsensedisplaynone">
<!-- put here all adsense code -->
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6332996084759514"
crossorigin="anonymous"
></script>

<ins
class="adsbygoogle"
style="display: block"
data-ad-format="fluid"
data-ad-layout-key="-f9+5v+4m-d8+7b"
data-ad-client="ca-pub-6332996084759514"
data-ad-slot="6018005630"
></ins>
<script>
;(adsbygoogle = window.adsbygoogle || []).push({})
</script>
</div>
</body>
<ins
class="adsbygoogle"
style="display: block"
data-ad-format="fluid"
data-ad-layout-key="-f9+5v+4m-d8+7b"
data-ad-client="ca-pub-6332996084759514"
data-ad-slot="6018005630"
></ins>
<script>
;(adsbygoogle = window.adsbygoogle || []).push({})
</script>
</div>
</body>
</html>
3 changes: 3 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"include": ["./src/**/*"]
}
85 changes: 44 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
{
"name": "ku-table",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "NODE_OPTIONS=--openssl-legacy-provider vite",
"build": "NODE_OPTIONS=--openssl-legacy-provider vite build",
"serve": "NODE_OPTIONS=--openssl-legacy-provider vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src",
"prepare": "husky install",
"pre-commit": "lint-staged"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^3.0.5",
"axios": "^0.21.1",
"k-progress-v3": "^1.0.0",
"regenerator-runtime": "^0.14.1",
"vue": "^3.3.9",
"vue-html2canvas": "^0.0.4",
"vue-router": "^4.2.5",
"vuex": "^4.1.0"
},
"devDependencies": {
"@tailwindcss/postcss7-compat": "^2.2.7",
"@vitejs/plugin-vue": "^5.0.5",
"autoprefixer": "9",
"eslint": "8",
"eslint-plugin-vue": "8",
"husky": "^7.0.0",
"lint-staged": "^11.1.2",
"postcss": "7",
"prettier": "^2.3.2",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"vite": "^5.3.1"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
"name": "ku-table",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "NODE_OPTIONS=--openssl-legacy-provider vite",
"build": "NODE_OPTIONS=--openssl-legacy-provider vite build",
"serve": "NODE_OPTIONS=--openssl-legacy-provider vite preview",
"lint": "eslint --fix src",
"format": "prettier . --write",
"prepare": "husky install",
"pre-commit": "lint-staged"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/vue-fontawesome": "^3.0.5",
"axios": "^0.21.1",
"k-progress-v3": "^1.0.0",
"regenerator-runtime": "^0.14.1",
"vue": "^3.3.9",
"vue-html2canvas": "^0.0.4",
"vue-router": "^4.2.5",
"vuex": "^4.1.0"
},
"devDependencies": {
"@eslint/compat": "^1.1.0",
"@vitejs/plugin-vue": "^5.0.5",
"autoprefixer": "^10.4.19",
"eslint": "^9.5.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.26.0",
"husky": "^7.0.0",
"lint-staged": "^11.1.2",
"postcss": "^8.4.38",
"prettier": "^3.3.2",
"tailwindcss": "^3.4.4",
"typescript": "^5.5.2",
"vite": "^5.3.1"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
13 changes: 5 additions & 8 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const autoprefixer = require('autoprefixer');
const tailwindcss = require('tailwindcss');

module.exports = {
plugins: [
tailwindcss,
autoprefixer,
],
};
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Loading

0 comments on commit 4841022

Please sign in to comment.