mirror of
https://github.com/ivuorinen/generic-landing-page.git
synced 2026-01-26 03:33:59 +00:00
feat: switch to vite + upgrades
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -16,13 +16,13 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
node-version: [24.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
|
||||
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
npm run prod --if-present
|
||||
|
||||
- name: Store artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||
with:
|
||||
name: build-site
|
||||
path: dist
|
||||
|
||||
6
.github/workflows/npm.yml
vendored
6
.github/workflows/npm.yml
vendored
@@ -12,13 +12,13 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
node-version: [24.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
|
||||
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
|
||||
11614
package-lock.json
generated
11614
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@@ -2,10 +2,12 @@
|
||||
"name": "@ivuorinen/generic-landing-page",
|
||||
"version": "1.0.0",
|
||||
"description": "Generic landing page with some candy",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "npx mix build",
|
||||
"dev": "npx mix build",
|
||||
"prod": "npx mix build -p",
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"prod": "vite build",
|
||||
"preview": "vite preview",
|
||||
"eslint:fix": "eslint '**/*.{js,tsx,ts}' --fix",
|
||||
"eslint:report": "eslint '**/*.{js,tsx,ts}'"
|
||||
},
|
||||
@@ -25,17 +27,12 @@
|
||||
"devDependencies": {
|
||||
"@ivuorinen/eslint-config": "^0.5.0",
|
||||
"@ivuorinen/stylelint-config": "^0.3.0",
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"browser-sync": "*",
|
||||
"browser-sync-webpack-plugin": "^2.3.0",
|
||||
"engine.io": "^6.5.5",
|
||||
"laravel-mix": "^6.0.49",
|
||||
"mix-tailwindcss": "^1.3.0",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss-import": "^16.0.0",
|
||||
"resolve-url-loader": "^5.0.0",
|
||||
"sass": "^1.69.5",
|
||||
"sass-loader": "^16.0.0",
|
||||
"tailwindcss": "^4.1.12"
|
||||
"tailwindcss": "^4.1.12",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
@import "tailwindcss";
|
||||
@use "tailwindcss";
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<title>hi there!</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link href="app.css" rel="stylesheet" />
|
||||
<script src="app.js"></script>
|
||||
<link href="./app.scss" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body class="h-screen bg-gray-50">
|
||||
<div class="flex items-center justify-between h-screen px-8 py-16 mx-auto min-w-max max-w-7xl">
|
||||
<h1 class="text-3xl font-extrabold tracking-tight text-gray-900">hi there!</h1>
|
||||
</div>
|
||||
<script type="module" src="./app.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
26
vite.config.js
Normal file
26
vite.config.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { resolve } from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
root: 'src',
|
||||
plugins: [tailwindcss()],
|
||||
build: {
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: resolve(__dirname, 'src/index.html'),
|
||||
output: {
|
||||
entryFileNames: 'app.js',
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (assetInfo.name?.endsWith('.css')) return 'app.css';
|
||||
return '[name][extname]';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
open: true,
|
||||
},
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
const mix = require("laravel-mix");
|
||||
require("mix-tailwindcss");
|
||||
|
||||
mix
|
||||
.setResourceRoot("src")
|
||||
.setPublicPath("dist")
|
||||
.browserSync()
|
||||
.disableSuccessNotifications();
|
||||
|
||||
mix
|
||||
.js("src/app.js", "dist")
|
||||
.sass("src/app.scss", "dist")
|
||||
.tailwind()
|
||||
.copy("src/index.html", "dist");
|
||||
Reference in New Issue
Block a user