diff --git a/package.json b/package.json index d84dab0943..f707e04f44 100644 --- a/package.json +++ b/package.json @@ -1,41 +1,13 @@ { - "private": true, - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "npm run development -- --watch", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js" - }, - "devDependencies": { - "@babel/core": "^7.17.8", - "@babel/preset-env": "^7.16.11", - "axios": "^1.6.0", - "bootstrap": "^4.4.1", - "cross-env": "^5.1", - "jquery": "^3.5.0", - "laravel-mix": "^6.0.6", - "lodash": "^4.17.5", - "popper.js": "^1.16.1", - "resolve-url-loader": "^3.1.2", - "sass": "^1.49.9", - "sass-loader": "^12.6.0", - "vue": "^2.6.11", - "vue-template-compiler": "^2.6.11", - "webpack-cli": "^4.9.2" - }, - "dependencies": { - "@babel/plugin-proposal-object-rest-spread": "^7.17.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-transform-runtime": "^7.17.0", - "babel": "^6.23.0", - "laravel-echo": "^1.10.0", - "laravel-echo-server": "^1.6.2", - "postcss": "^8.4.31", - "pusher-js": "^5.1.1", - "socket.io-client": "^2.3.0", - "webpack": "^5.76.0" - } + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build" + }, + "devDependencies": { + "axios": "^1.6.1", + "laravel-vite-plugin": "^1.0.0", + "vite": "^5.0.0" + } } diff --git a/public/.htaccess b/public/.htaccess index b75525bedc..3aec5e27e5 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -14,7 +14,7 @@ RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] - # Handle Front Controller... + # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] diff --git a/public/mix-manifest.json b/public/mix-manifest.json deleted file mode 100644 index 2d60117130..0000000000 --- a/public/mix-manifest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "/js/app.js": "/js/app.js", - "/css/app.css": "/css/app.css" -} diff --git a/public/web.config b/public/web.config deleted file mode 100644 index d3711d7c5b..0000000000 --- a/public/web.config +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/css/app.css b/resources/css/app.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/resources/js/app.js b/resources/js/app.js index 40c55f65c2..e59d6a0adf 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1 +1 @@ -require('./bootstrap'); +import './bootstrap'; diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 52426b873b..846d350585 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,12 +1,11 @@ -window._ = require('lodash'); - /** * We'll load the axios HTTP library which allows us to easily issue requests * to our Laravel back-end. This library automatically handles sending the * CSRF token as a header based on the value of the "XSRF" token cookie. */ -window.axios = require('axios'); +import axios from 'axios'; +window.axios = axios; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; @@ -16,13 +15,18 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; * allows your team to easily build robust real-time web applications. */ -import Echo from 'laravel-echo' +// import Echo from 'laravel-echo'; -if (window.useEcho) { - window.io = require('socket.io-client'); +// import Pusher from 'pusher-js'; +// window.Pusher = Pusher; - window.Echo = new Echo({ - broadcaster: 'socket.io', - host: window.location.hostname - }); -} +// window.Echo = new Echo({ +// broadcaster: 'pusher', +// key: import.meta.env.VITE_PUSHER_APP_KEY, +// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', +// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, +// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, +// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, +// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', +// enabledTransports: ['ws', 'wss'], +// }); diff --git a/resources/js/components/ExampleComponent.vue b/resources/js/components/ExampleComponent.vue deleted file mode 100644 index 3fb9f9aa7c..0000000000 --- a/resources/js/components/ExampleComponent.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/resources/sass/_variables.scss b/resources/sass/_variables.scss deleted file mode 100644 index 0407ab5773..0000000000 --- a/resources/sass/_variables.scss +++ /dev/null @@ -1,19 +0,0 @@ -// Body -$body-bg: #f8fafc; - -// Typography -$font-family-sans-serif: 'Nunito', sans-serif; -$font-size-base: 0.9rem; -$line-height-base: 1.6; - -// Colors -$blue: #3490dc; -$indigo: #6574cd; -$purple: #9561e2; -$pink: #f66d9b; -$red: #e3342f; -$orange: #f6993f; -$yellow: #ffed4a; -$green: #38c172; -$teal: #4dc0b5; -$cyan: #6cb2eb; diff --git a/resources/sass/app.scss b/resources/sass/app.scss deleted file mode 100644 index 3193ffa215..0000000000 --- a/resources/sass/app.scss +++ /dev/null @@ -1,8 +0,0 @@ -// Fonts -@import url('https://fonts.googleapis.com/css?family=Nunito'); - -// Variables -@import 'variables'; - -// Bootstrap -@import '~bootstrap/scss/bootstrap'; diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index ed0dd42c04..638ec96066 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,4 +1,4 @@ - + @@ -7,91 +7,132 @@ Laravel - + + - -
+ +
@if (Route::has('login')) -