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 support #3

Closed
wants to merge 1 commit into from
Closed

Add TypeScript support #3

wants to merge 1 commit into from

Conversation

dsevillamartin
Copy link
Member

@dsevillamartin dsevillamartin commented Jun 20, 2020

Support TypeScript

  • Support forum.ts & admin.ts
  • Can import TS files from JS just fine
  • Babel processes TS
  • Add tsconfig.json
    • Don't think all those config keys are needed, but to make code editors a bit happier when linting

    • tsconfig.json is not required in projects, but code editors will want it - its contents can just be

      {
        "extends": "flarum-webpack-config"
      }

How do we want to add this to core?

Perhaps publish a beta 11 (I changed the version here to beta.11-dev)? That might be the easiest way.

@tankerkiller125
Copy link

tankerkiller125 commented Jun 20, 2020

Especially since it only adds typescript support and doesn't change anything else I'd say go for it.

@dsevillamartin
Copy link
Member Author

We'd probably publish this as beta 11 after merging to be able to easily use in flarum/core to start converting to TS.

@askvortsov1
Copy link
Sponsor Member

@datitisev would you be comfortable merging this now and publishing so we can use it in core, and putting the core extension stuff in a second (soon to follow) release? Or do you prefer that we release both at the same time? I just feel like we need some more discussion on the other one, but this one seems good to go

@dsevillamartin
Copy link
Member Author

@askvortsov1 We don't need to publish this yet. My PR has a temporary TS configuration (suggested by Franz) so that we don't have to publish this yet, specially if problems arise.

dsevillamartin added a commit to flarum/framework that referenced this pull request Jun 21, 2020
franzliedke pushed a commit to flarum/framework that referenced this pull request Jul 3, 2020
This allows us to get started with converting all Flarum JavaScript code to TypeScript.
In addition, we will have time to experiment to find the best Webpack configuration before integrating into flarum-webpack-config.

See flarum/flarum-webpack-config#3.
@dsevillamartin dsevillamartin marked this pull request as draft October 2, 2020 23:04
@dsevillamartin
Copy link
Member Author

Switched to draft so that we remember to revisit this and make the proper changes.

@davwheat
Copy link
Member

I'm just curious, but why do we need all the extra options compared to our existing TS shim used in core?

@davwheat
Copy link
Member

Superseded by #11.

@davwheat davwheat closed this May 12, 2021
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.

4 participants