Skip to content

Commit

Permalink
Update to 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
digikid committed Aug 10, 2023
1 parent faf5eff commit 6cd10d9
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 110 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@
"airbnb-typescript/base"
],
"rules": {
"no-undef": "off"
}
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
],
"rules": {
"import/prefer-default-export": "off"
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

[1.1.2]: https://github.com/digikid/vite-vue-project/releases/tag/1.1.2

## [1.1.2] - 2023-08-10
## [1.1.2] - 2023-08-11

### Updates

- Remove [line-clamp](https://github.com/tailwindlabs/tailwindcss-line-clamp) plugin (deprecated in Tailwind v3.3)
- Move typing files to `src` folder
- Update configuration files
- All dependencies updated to their latest versions

### Remove

- [line-clamp](https://github.com/tailwindlabs/tailwindcss-line-clamp) plugin (deprecated in Tailwind v3.3)
- [vite-tsconfig-paths](https://www.npmjs.com/package/vite-tsconfig-paths) package

[1.1.1]: https://github.com/digikid/vite-vue-project/releases/tag/1.1.1

## [1.1.1] - 2022-08-28
Expand Down
48 changes: 1 addition & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vite-tsconfig-paths": "^4.2.0",
"vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.8.8"
}
Expand Down
14 changes: 5 additions & 9 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import tailwind from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import tailwindConfig from './tailwind.config';

export default {
plugins: [
tailwind(tailwindConfig),
autoprefixer
],
};
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import HelloWorld from '@components/HelloWorld.vue';
import HelloWorld from '@/components/HelloWorld.vue';
</script>

<template>
Expand Down
4 changes: 2 additions & 2 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const includes: string[][] = [
<h1 class="text-4xl md:text-5xl font-black mb-3">
{{ title }}
</h1>
<h2 class="text-xl md:text-3xl font-bold mb-5 text-slate-300 mb-7">
<h2 class="text-xl md:text-3xl font-bold text-slate-300 mb-7">
Modern starter template for Vite using Vue and TypeScript
</h2>
<h3
Expand All @@ -43,7 +43,7 @@ const includes: string[][] = [
<img
:src="`images/${include[0]}.svg`"
:alt="include[1]"
class="mx-auto mb-3 h-[120px] md:h-[80px] mb-7"
class="mx-auto h-[120px] md:h-[80px] mb-7"
>
<h4 class="text-2xl font-bold leading-snug tracking-tight mb-1">
{{ include[1] }}
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createApp } from 'vue';

import App from './App.vue';
import App from '@/App.vue';

import './main.css';
import '@/main.css';

const app = createApp(App);

Expand Down
5 changes: 1 addition & 4 deletions src/typings/vite-env.d.ts → src/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/// <reference types="vite/client" />

declare module '*.vue' {
import type { DefineComponent } from 'vue';

const component: DefineComponent<unknown, unknown, any>;

const component: DefineComponent<Record<never, never>, Record<never, never>, any>;
export default component;
}
9 changes: 5 additions & 4 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import aspectRatio from '@tailwindcss/aspect-ratio';

import defaultTheme from 'tailwindcss/defaultTheme';

/** @type {import('tailwindcss').Config} */
export default {
content: [
'./index.html',
'./src/**/*.{vue,js,jsx,ts,tsx}',
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
],
theme: {
extend: {
Expand All @@ -23,5 +24,5 @@ export default {
forms,
typography,
aspectRatio
],
};
]
}
16 changes: 3 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,13 @@
"ESNext",
"DOM"
],
"baseUrl": "src",
"baseUrl": ".",
"paths": {
"@src/*": [
"*"
],
"@typings/*": [
"typings/*"
],
"@components/*": [
"components/*"
]
"@/*": ["src/*"]
}
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue"
"src/**/*"
],
"references": [{
"path": "tsconfig.node.json"
Expand Down
28 changes: 5 additions & 23 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
import { defineConfig } from 'vite';
import { resolve } from 'path';
import { compilerOptions } from './tsconfig.json';

import path from 'path';
import vue from '@vitejs/plugin-vue';
import tsConfigPaths from 'vite-tsconfig-paths';
import postcssConfig from './postcss.config.js';

const { baseUrl, paths: aliases } = compilerOptions;

const alias = Object.entries(aliases).reduce((acc, [key, [value]]) => {
const [aliasKey, path] = [key, value].map(v => v.substring(0, v.length - 2));

const aliasPath = resolve(__dirname, baseUrl, path);

return {
...acc,
[aliasKey]: aliasPath
};
}, {});
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [
tsConfigPaths(),
vue()
],
resolve: {
alias
},
css: {
postcss: postcssConfig,
alias: {
'@': path.resolve(__dirname, 'src')
}
},
server: {
open: true,
Expand Down

0 comments on commit 6cd10d9

Please sign in to comment.