Skip to content

Commit

Permalink
[4.x] Mix to Vite migration (#1391)
Browse files Browse the repository at this point in the history
* Mix to Vite migration

Migrated from laravel mix to vite following official migration guide: https://laravel.com/docs/10.x/vite

vite

* StyleCI fixes.

* StyleCI fixes.

* Refactored code fixing some issues and replacing require with import.

* StyleCI fixes.

* Update app.js

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update app.js

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update preview.vue

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update preview.vue

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update preview.vue

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update preview.vue

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update preview.vue

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Update preview.vue

Co-authored-by: Mior Muhammad Zaki <[email protected]>

* Following same studly case

* Typo in css property fixed: jusify-content -> justify-content

* Unified telescope vendor build path

* Refreshed the artifactes.

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: Eugene Surov <[email protected]>
Co-authored-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
3 people authored Oct 26, 2023
1 parent 69ed39e commit 46b85cd
Show file tree
Hide file tree
Showing 21 changed files with 1,781 additions and 8,800 deletions.
10,166 changes: 1,495 additions & 8,671 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.2.0",
"axios": "^0.21",
"bootstrap": "^4.5.0",
"highlight.js": "^11.3.1",
"jquery": "^3.5",
"laravel-mix": "^6.0.6",
"laravel-vite-plugin": "^0.8.1",
"lodash": "^4.17.19",
"moment": "^2.29.4",
"moment-timezone": "^0.5.40",
Expand All @@ -23,11 +19,12 @@
"sass": "^1.15.2",
"sass-loader": "^11.0.1",
"sql-formatter": "^3.1.0",
"vite": "^4.4.11",
"vue": "^2.5.7",
"vue-copy-to-clipboard": "^1.0.3",
"vue-json-pretty": "^1.6.2",
"vue-loader": "^15.9.6",
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.5.21",
"vue-copy-to-clipboard": "^1.0.3"
"vue-template-compiler": "^2.5.21"
}
}
8 changes: 0 additions & 8 deletions public/app-dark.css

This file was deleted.

7 changes: 0 additions & 7 deletions public/app.css

This file was deleted.

2 changes: 0 additions & 2 deletions public/app.js

This file was deleted.

1 change: 1 addition & 0 deletions public/build/assets/app-078b96bc.css

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

6 changes: 6 additions & 0 deletions public/build/assets/app-7fe7ae9e.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions public/build/assets/app-dark-54427812.css

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions public/build/assets/app-f966f027.js

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"resources/js/app.css": {
"file": "assets/app-078b96bc.css",
"src": "resources/js/app.css"
},
"resources/js/app.js": {
"css": [
"assets/app-078b96bc.css"
],
"file": "assets/app-f966f027.js",
"isEntry": true,
"src": "resources/js/app.js"
},
"resources/sass/app-dark.scss": {
"file": "assets/app-dark-54427812.css",
"isEntry": true,
"src": "resources/sass/app-dark.scss"
},
"resources/sass/app.scss": {
"file": "assets/app-7fe7ae9e.css",
"isEntry": true,
"src": "resources/sass/app.scss"
}
}
5 changes: 0 additions & 5 deletions public/mix-manifest.json

This file was deleted.

20 changes: 13 additions & 7 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ import VueRouter from 'vue-router';
import VueJsonPretty from 'vue-json-pretty';
import 'vue-json-pretty/lib/styles.css';
import moment from 'moment-timezone';
import RelatedEntries from './components/RelatedEntries.vue';
import IndexScreen from './components/IndexScreen.vue';
import PreviewScreen from './components/PreviewScreen.vue';
import AlertComponent from './components/Alert.vue';
import CopyClipboard from './components/CopyClipboard.vue';

require('bootstrap');
import 'bootstrap';

let token = document.head.querySelector('meta[name="csrf-token"]');

Expand All @@ -17,7 +22,8 @@ if (token) {

Vue.use(VueRouter);

window.Popper = require('popper.js').default;
import Popper from 'popper.js';
window.Popper = Popper;

moment.tz.setDefault(Telescope.timezone);

Expand All @@ -37,11 +43,11 @@ const router = new VueRouter({
});

Vue.component('vue-json-pretty', VueJsonPretty);
Vue.component('related-entries', require('./components/RelatedEntries.vue').default);
Vue.component('index-screen', require('./components/IndexScreen.vue').default);
Vue.component('preview-screen', require('./components/PreviewScreen.vue').default);
Vue.component('alert', require('./components/Alert.vue').default);
Vue.component('copy-clipboard', require('./components/CopyClipboard.vue').default);
Vue.component('related-entries', RelatedEntries);
Vue.component('index-screen', IndexScreen);
Vue.component('preview-screen', PreviewScreen);
Vue.component('alert', AlertComponent);
Vue.component('copy-clipboard', CopyClipboard);

Vue.mixin(Base);

Expand Down
Loading

0 comments on commit 46b85cd

Please sign in to comment.