Skip to content
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

add TypeScript integration #207

Closed
wants to merge 28 commits into from
Closed

add TypeScript integration #207

wants to merge 28 commits into from

Conversation

lv-kit
Copy link
Contributor

@lv-kit lv-kit commented Mar 23, 2019

Hello everyone !

Added TypeScript integration option for Merge nuxt / nuxt.js # 5079. This will allow you to use TypeScript soon.

With the addition of the TypeScript selection, the choices are as follows:
スクリーンショット 2019-03-23 16 19 17

In addition, the version of Nuxt.js has been updated to 2.5.1 to support TS.

@lv-kit lv-kit changed the title support typescript [WIP]support typescript Mar 23, 2019
@lv-kit lv-kit changed the title [WIP]support typescript add TypeScript integration Mar 23, 2019
@kevinmarrec
Copy link
Contributor

Thanks @takehiro-takahashi ! I don't know if we should maybe wait before releasing this feature as we're planning to change again how is handled tsconfig.json.

/cc @pi0 WDYT ?

package.json Outdated Show resolved Hide resolved
@clarkdo
Copy link
Member

clarkdo commented Mar 23, 2019

@takehiro-takahashi Thank you so much for the contribution

@takehiro-takahashi @kevinmarrec @pi0 I think if ts is selected, typescript related code should be changed, like changing index.vue to ts lang.

@kevinmarrec
Copy link
Contributor

@clarkdo Yes you're right

@lv-kit
Copy link
Contributor Author

lv-kit commented Mar 23, 2019

@clarkdo @kevinmarrec

I also thought that it might be necessary.
However, considering the freedom of users, I thought that it would be sufficient for the environment to be able to use TS.
If you need the TS version of the source code, I will prepare it immediately.

@lv-kit
Copy link
Contributor Author

lv-kit commented Mar 24, 2019

@clarkdo @kevinmarrec

Added TS base of Vuetify and nuxt default. iview is not supported because iview's TS type definition file itself did not work.
I am glad that you confirm at the timing.

@clarkdo clarkdo requested a review from pi0 April 8, 2019 14:14
@@ -33,7 +33,7 @@ Generated by [AVA](https://ava.li).
{
dependencies: {
'cross-env': '^5.2.0',
nuxt: '^2.4.0',
nuxt: '^2.5.1',
Copy link
Member

Choose a reason for hiding this comment

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

Is version bumped by this PR? And if so why not using 2.6.1?

@@ -50,7 +50,9 @@
"nuxt-buefy": "^0.3.2"<% } else if (ui === 'iview') { %>,
"iview": "3.1.5"<% } %><% if (axios === 'yes') { %>,
"@nuxtjs/axios": "^5.3.6"<% } %><% if (pwa === 'yes') { %>,
"@nuxtjs/pwa": "^2.6.0"<% } %><% if (ui === 'tachyons') { %>,
"@nuxtjs/pwa": "^2.6.0"<% } %><% if (typescript === 'yes') { %>,
"@nuxt/typescript": "^2.5.1",
Copy link
Member

Choose a reason for hiding this comment

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

This would be better to be in devDependencies and instead, adding ts-node and typescript to dependencies.

"vuetify-loader": "^1.2.1"<% } else if (ui === 'bulma') { %>,
"@nuxtjs/bulma": "^1.2.1"<% } else if (ui === 'element-ui') { %>,
"element-ui": "^2.4.11"<% } else if (ui === 'ant-design-vue') { %>,
"ant-design-vue": "^1.1.10"<% } else if (ui === 'buefy') { %>,
"nuxt-buefy": "^0.3.2"<% } else if (ui === 'iview') { %>,
"iview": "3.1.5"<% } %><% if (axios === 'yes') { %>,
"@nuxtjs/axios": "^5.3.6"<% } %><% if (pwa === 'yes') { %>,
"@nuxtjs/pwa": "^2.6.0"<% } %><% if (ui === 'tachyons') { %>,
"@nuxtjs/pwa": "^2.6.0"<% } %><% if (typescript === 'yes') { %>,
"ts-node": "^8.0.3",
Copy link
Member

Choose a reason for hiding this comment

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

I think typescript is a peer dependency of it (for the compiler). /cc @kevinmarrec

Copy link
Contributor

Choose a reason for hiding this comment

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

That's true, and as typescript is shipped in @nuxt/typescript which is installed as devDep, it will bring the issue that typescript won't be installed in production.

@kevinmarrec
Copy link
Contributor

@pi0 What do you think of the status of this PR ? It seems kind of ready to me, unless we change our typescript behavior again (which has highly chance to happen, regarding a potential nuxt.config .ts extension check to enable TS support)

@pi0
Copy link
Member

pi0 commented Apr 29, 2019

I would suggest holding on this PR until latest final breaking change.

@robsontenorio
Copy link

@takehiro-takahashi @pi0 Is it time?

@kevinmarrec
Copy link
Contributor

kevinmarrec commented Jun 2, 2019

Sorry for delay, we're waiting last breaking changes I'm wonking on (outsourcing typescript support in dedicated module & repository) to get this PR finally ready & bring this typescript integration.

@florianrusch
Copy link

@kevinmarrec @pi0 @takehiro-takahashi Are we still waiting? 🙂 Is there anything we can help with?

@kevinmarrec
Copy link
Contributor

kevinmarrec commented Aug 9, 2019

@florianrusch Well lof things have changed since the last status of this PR
Furthermore I'm not sure if we should showcase vue-property-decorator (Class API)
We should most probably showcase standard (Object) API with TypeScript.
Something we can also do could be : let user select between 3 Available Vue API (object, class, function), see https://typescript.nuxtjs.org/cookbook/components.html (SPOIL Nuxt 2.9 :D)

krsnadjava25 added a commit to krsnadjava25/nuxt-ts that referenced this pull request Aug 11, 2019
@kevinmarrec
Copy link
Contributor

@takehiro-takahashi Thank you so much for your time, but I'm closing in favor of #328

@lv-kit lv-kit deleted the support_typescript branch January 10, 2020 04:01
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.

None yet

6 participants