Skip to content

WIP: Vue to Nuxt migration #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 367 commits into from
Nov 9, 2021
Merged

WIP: Vue to Nuxt migration #843

merged 367 commits into from
Nov 9, 2021

Conversation

dezine2dev
Copy link
Contributor

@dezine2dev dezine2dev commented Oct 5, 2021

Story
Migration nft-gallery into Nuxt

Summary
This is work in progress
Everything is in /nuxt folder. (One everything is done, it will be replaced with root folder)
node version - v16

Related #584
Related #912

https://koda-nuxt.netlify.app/ for main-nuxt branch

@yangwao
Copy link
Member

yangwao commented Nov 3, 2021

When I clicked to from https://deploy-preview-843--koda-nuxt.netlify.app/rmrk/gallery/9935513-466e8b6338599eaf1e-GAVCUBE-GAV_CUBE_056-0000000000000056

to profile author
image

I landed on a blank screen, the probably routing is broken?

@dezine2dev
Copy link
Contributor Author

When I clicked to from https://deploy-preview-843--koda-nuxt.netlify.app/rmrk/gallery/9935513-466e8b6338599eaf1e-GAVCUBE-GAV_CUBE_056-0000000000000056

to profile author image

I landed on a blank screen, the probably routing is broken?

Yes it is another routing breaks.
I will handle that and possible other things as well.
The main reason of this kind of issues is because original app handles routing by name and that name does not match in nuxt. Nuxt creates routing name by folder structure and I need to do navigation by path.

@yangwao yangwao mentioned this pull request Nov 4, 2021
'plugin:vue/recommended',
// 'prettier',
],
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

'plugin:vue/recommended',
// 'prettier',
],
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

}
}
},
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

extend (config, { isDev, isClient }) {
config.node = {
fs: 'empty'
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.


// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
extend (config, { isDev, isClient }) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -0,0 +1,137 @@
export default {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'export' is only available in ES6 (use 'esversion: 6').

return type;
}
});
export default function findComponent(def, overrides = {}) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'default parameters' is only available in ES6 (use 'esversion: 6').
'export' is only available in ES6 (use 'esversion: 6').

return 'Tuple';
case TypeDefInfo.Vec:
return ['Vec<KeyValue>'].includes(type)
? 'Vec<KeyValue>'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading line break before '?'; readers may interpret this as an expression boundary.

});
return componentList;
}, {});
const getType = (({ displayName, info, sub, type }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

{ c: VoteThreshold, t: ['VoteThreshold'] },
{ c: Unknown, t: ['Unknown'] },
].reduce((componentList, { c, t }) => {
t.forEach((type) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

{ c: Vote, t: ['Vote'] },
{ c: VoteThreshold, t: ['VoteThreshold'] },
{ c: Unknown, t: ['Unknown'] },
].reduce((componentList, { c, t }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

}
}
},
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

extend (config, { isDev, isClient }) {
config.node = {
fs: 'empty'
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.


// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
extend (config, { isDev, isClient }) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -0,0 +1,137 @@
export default {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'export' is only available in ES6 (use 'esversion: 6').

catch (error) {
// console.error(error.message);
}
console.warn(`Cannot find Component for ${type}, defaulting to Unknown`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'template literal syntax' is only available in ES6 (use 'esversion: 6').

return 'Tuple';
case TypeDefInfo.Vec:
return ['Vec<KeyValue>'].includes(type)
? 'Vec<KeyValue>'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading line break before '?'; readers may interpret this as an expression boundary.

});
return componentList;
}, {});
const getType = (({ displayName, info, sub, type }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

{ c: VoteThreshold, t: ['VoteThreshold'] },
{ c: Unknown, t: ['Unknown'] },
].reduce((componentList, { c, t }) => {
t.forEach((type) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

{ c: Vote, t: ['Vote'] },
{ c: VoteThreshold, t: ['VoteThreshold'] },
{ c: Unknown, t: ['Unknown'] },
].reduce((componentList, { c, t }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

import Vector from './Vector.vue';
import Vote from './Vote.vue';
import VoteThreshold from './VoteThreshold.vue';
const components = [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

import Unknown from './Unknown.vue';
import Vector from './Vector.vue';
import Vote from './Vote.vue';
import VoteThreshold from './VoteThreshold.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Tuple from './Tuple.vue';
import Unknown from './Unknown.vue';
import Vector from './Vector.vue';
import Vote from './Vote.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import TextField from './TextField.vue';
import Tuple from './Tuple.vue';
import Unknown from './Unknown.vue';
import Vector from './Vector.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Struct from './Struct.vue';
import TextField from './TextField.vue';
import Tuple from './Tuple.vue';
import Unknown from './Unknown.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Raw from './Raw.vue';
import Struct from './Struct.vue';
import TextField from './TextField.vue';
import Tuple from './Tuple.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Hash512 from './Hash512.vue';
import KeyValue from './KeyValue.vue';
import KeyValueArray from './KeyValueArray.vue';
import Moment from './Moment.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Hash256 from './Hash256.vue';
import Hash512 from './Hash512.vue';
import KeyValue from './KeyValue.vue';
import KeyValueArray from './KeyValueArray.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Enum from './Enum.vue';
import Hash256 from './Hash256.vue';
import Hash512 from './Hash512.vue';
import KeyValue from './KeyValue.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import DispatchError from './DispatchError.vue';
import Enum from './Enum.vue';
import Hash256 from './Hash256.vue';
import Hash512 from './Hash512.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Code from './Code.vue';
import DispatchError from './DispatchError.vue';
import Enum from './Enum.vue';
import Hash256 from './Hash256.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').



} catch (e) {
console.log('Error', e.message)
return {
statusCode: 500,
body: e.message,
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.


return {
statusCode: status,
body: JSON.stringify(data),
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

});
console.log('[PINATA] Pin HASH', status, data);
})
console.log('[PINATA] Pin HASH', status, data)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

@@ -21,22 +21,22 @@ exports.handler = async (event, context) => {
pinata_api_key: process.env.PINATA_API_KEY,
pinata_secret_api_key: process.env.PINATA_SECRET_API_KEY
},
});
console.log('[PINATA] Pin HASH', status, data);
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

}

const BASE_URL = `https://api.pinata.cloud/pinning/unpin/${hash}`;
const BASE_URL = `https://api.pinata.cloud/pinning/unpin/${hash}`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'template literal syntax' is only available in ES6 (use 'esversion: 6').
Missing semicolon.

scssRule.uses.clear()
scssRule
.use('null-loader')
.loader('null-loader')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

@@ -28,13 +28,20 @@ module.exports = {
},

chainWebpack: config => {
if (process.env.NODE_ENV === 'test') {
const scssRule = config.module.rule('scss')
scssRule.uses.clear()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

@@ -28,13 +28,20 @@ module.exports = {
},

chainWebpack: config => {
if (process.env.NODE_ENV === 'test') {
const scssRule = config.module.rule('scss')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.

import Call from './Call.vue';
import Code from './Code.vue';
import DispatchError from './DispatchError.vue';
import Enum from './Enum.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

import Bytes from './Bytes.vue';
import Call from './Call.vue';
import Code from './Code.vue';
import DispatchError from './DispatchError.vue';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'import' is only available in ES6 (use 'esversion: 6').

This was referenced Nov 8, 2021
@yangwao yangwao merged commit b89f5df into main-nuxt Nov 9, 2021
@yangwao yangwao deleted the issue/584 branch January 13, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants