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 template #5

Merged
merged 9 commits into from
Oct 4, 2020
Merged

Conversation

LitoMore
Copy link
Contributor

@LitoMore LitoMore commented Sep 19, 2020

Resolve #2

Difference from #4

  • Use --typescript option for creating with TypeScript React
  • Organize template files, common files have been moved to templates/_common directory
  • Use @sindresorhus/tsconfig
  • source directory name for source code
  • Has exports - Component compatible
  • My PR is alive :)

@LitoMore
Copy link
Contributor Author

BTW, I can add the component creating support on another PR.

$ create-ink-app --component
# or
$ craete-ink-component

cli.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@vadimdemedes
Copy link
Owner

Have some minor comments, but great work overall!

BTW, I can add the component creating support on another PR.

I think it'd better fit in a create-ink-component package instead.

LitoMore and others added 5 commits October 3, 2020 23:17
Co-authored-by: Vadim Demedes <[email protected]>
Co-authored-by: Vadim Demedes <[email protected]>
Co-authored-by: Vadim Demedes <[email protected]>
Co-authored-by: Vadim Demedes <[email protected]>
@vadimdemedes
Copy link
Owner

Hey @LitoMore, I'm getting this error when running npm test in a TypeScript CLI:

> xo && ava


  source/cli.tsx:6:13
  ✖  6:13  A space is forbidden before closing bracket  react/jsx-tag-spacing

  1 error
npm ERR! Test failed.  See above for more details.

@LitoMore
Copy link
Contributor Author

LitoMore commented Oct 3, 2020

Hey @LitoMore, I'm getting this error when running npm test in a TypeScript CLI

Fixed.

BTW, I can also enhance our CI to test the generated app. Should I add the generated app test in this PR or open a new PR?

@vadimdemedes
Copy link
Owner

Good idea, let's do it in a separate PR ;)

@LitoMore
Copy link
Contributor Author

LitoMore commented Oct 3, 2020

let's do it in a separate PR ;)

OK, now this PR is done.

@vadimdemedes
Copy link
Owner

There's a regression, TS version doesn't have --help support and doesn't even use meow. See cli.js in JS version.

@LitoMore
Copy link
Contributor Author

LitoMore commented Oct 3, 2020

There's a regression, TS version doesn't have --help support and doesn't even use meow. See cli.js in JS version.

Resolved.

index.js Show resolved Hide resolved
@vadimdemedes
Copy link
Owner

Great work, thanks @LitoMore!

@vadimdemedes vadimdemedes changed the title Allow creating with TypeScript React Add TypeScript template Oct 4, 2020
@vadimdemedes vadimdemedes merged commit 70897c5 into vadimdemedes:master Oct 4, 2020
@LitoMore LitoMore deleted the tsx branch October 5, 2020 15:17
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.

Typescript
2 participants