Skip to content

Commit

Permalink
WIP: Upgrade to Vue 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jdlrobson committed Jan 7, 2024
1 parent 0b1cea6 commit f942a37
Show file tree
Hide file tree
Showing 10 changed files with 2,882 additions and 2,634 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19.2.0
5,450 changes: 2,854 additions & 2,596 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
</script>

<style lang="less" scoped>
main {
#app {
height: 100%;
}
nav {
Expand Down
1 change: 1 addition & 0 deletions src/components/NavPanel.less
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ header div {
position: absolute;
height: @height-nav-link-border * 2;
border-left: solid 2px #000;
margin-left: -2px;
z-index: 1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body {
margin: 0;
}

main {
#app {
min-width: 300px;
}

Expand All @@ -53,7 +53,7 @@ main {
font-size: unit( ( 14 / 16 ), em );
}

main,
#app,
body,
html {
box-sizing: content-box;
Expand Down
32 changes: 14 additions & 18 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
import Vue from 'vue';
import VueRouter from 'vue-router';
import { createApp } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
import App from './App.vue';
import routes from './routes';

Vue.use( VueRouter );

const router = new VueRouter( {
const router = createRouter( {
history: createWebHashHistory(),
routes
} );

Vue.directive( 'focus', {
// When the bound element is inserted into the DOM...
inserted: function ( el ) {
// Focus the element
el.focus();
}
} );

new Vue( {
el: '#app',
router,
render: ( h ) => h( App )
} );
const app = createApp( App )

Check failure on line 11 in src/main.js

View workflow job for this annotation

GitHub Actions / build (14.17.5)

'app' is assigned a value but never used
.use( router )
.directive( 'focus', {
// When the bound element is inserted into the DOM...
inserted: function ( el ) {
// Focus the element
el.focus();
}
} )
.mount( '#app' );
2 changes: 1 addition & 1 deletion src/pages/Add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ import Tabs from '../components/Tabs.vue';
import Tab from '../components/Tab.vue';
import Preview from '../components/Preview.vue';
import nameMe from '../nameMe';
import JsonViewer from 'vue-json-viewer';
import JsonViewer from 'vue-json-pretty';
import Page from './Page.vue';
const assets = buildDefaultAssets();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
};
</script>

<style lang="less" scoped>
<style>
.page--home {
display: none;
}
Expand Down
14 changes: 7 additions & 7 deletions src/routes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import HomePage from './pages/HomePage';
import Explore from './pages/Explore';
import Skin from './pages/Skin';
import NotFound from './pages/NotFound';
import Add from './pages/Add';
import BuildExtension from './pages/BuildExtension';
import HomePage from './pages/HomePage.vue';
import Explore from './pages/Explore.vue';
import Skin from './pages/Skin.vue';
import NotFound from './pages/NotFound.vue';
import Add from './pages/Add.vue';
import BuildExtension from './pages/BuildExtension.vue';

export default [
{
Expand All @@ -27,7 +27,7 @@ export default [
component: Skin
},
{
path: '*',
path: '/:catchAll(.*)',
component: NotFound
}
];

0 comments on commit f942a37

Please sign in to comment.