Skip to content

Commit

Permalink
Merge pull request #931 from portabilis/laravel
Browse files Browse the repository at this point in the history
Laravel
  • Loading branch information
edersoares authored Dec 26, 2023
2 parents 18fe2da + 56e69c0 commit 134af7a
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 220 deletions.
50 changes: 11 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
2 changes: 1 addition & 1 deletion public/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 0 additions & 4 deletions public/mix-manifest.json

This file was deleted.

28 changes: 0 additions & 28 deletions public/web.config

This file was deleted.

Empty file added resources/css/app.css
Empty file.
2 changes: 1 addition & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('./bootstrap');
import './bootstrap';
26 changes: 15 additions & 11 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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'],
// });
23 changes: 0 additions & 23 deletions resources/js/components/ExampleComponent.vue

This file was deleted.

19 changes: 0 additions & 19 deletions resources/sass/_variables.scss

This file was deleted.

8 changes: 0 additions & 8 deletions resources/sass/app.scss

This file was deleted.

Loading

0 comments on commit 134af7a

Please sign in to comment.