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

init scaffolding should prompt for installing common plugins (TypeScript and markdown) #1270

Open
thescientist13 opened this issue Aug 29, 2024 · 2 comments
Labels
documentation Greenwood specific docs feature New feature or request Init
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Aug 29, 2024

Summary

Coming out of #1253, I think to continue making the Init scaffolding tool more valuable, we should add prompts to auto install / configure

Something like

➜  Workspace npx @greenwood/init@latest
Need to install the following packages:
  @greenwood/[email protected]
Ok to proceed? (y) y
-------------------------------------------------------
Initialize Greenwood Template ♻️
-------------------------------------------------------
(node:57730) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
? Would you like to use TypeScript? (Use arrow keys)
❯ Yes (default)
❯ No

? Would you like to use markdown? (Use arrow keys)
❯ Yes (default)
❯ No

Details

In addition, we should probably start prompting for an output directory, or at least defaulting to

? Project name you like to use markdown? (type)
❯ my-app (default)

We might also want to move the template prompt to a selector as well, just to keep the experience consistent.

? Would you like to use a template? (Use arrow keys)
❯ No (default)
❯ Blog
❯ ...

If possible, we should try and tackle #1050 / #787 at the same time

@thescientist13 thescientist13 added documentation Greenwood specific docs feature New feature or request Init labels Aug 29, 2024
@thescientist13 thescientist13 added this to the 1.0 milestone Aug 29, 2024
@thescientist13 thescientist13 changed the title init scaffolding should prompt for installing common plugins (TS and markdown) init scaffolding should prompt for installing common plugins (TypeScript and markdown) Aug 29, 2024
@thescientist13 thescientist13 moved this from 🔖 Ready to 📋 Backlog in [Greenwood] Phase 11 - Burndown to 1.0 Sep 11, 2024
@lschierer
Copy link
Contributor

There should also be some documentation in the website about using Typescript with Greenwood. Things like where you can import type definitions from for the various data structures so that you can take advantage of the type safety of typescript. If the project has any recommendations for tsconfig.json settings to maximize compatibility, or to avoid incompatibility, that should be noted. If there are recommendations for configuring Rollup or the any other part of the toolchain for the best user experience, that would be useful as well, even if only as an example.

@thescientist13
Copy link
Member Author

Yeah, good call outs and thanks for the feedback!

There should also be some documentation in the website about using Typescript with Greenwood

We actually have a new website launching next week which definitely aims to improve not only the overall presentation of Greenwood itself, but the Information Architecture, to make these sort of things more discoverable at a glance. In particular TypeScript will get a dedicated page / menu item on the side nav.

Right now we do have some documentation related to our TypeScript plugin but its buried in a table of contents on a not so obvious page, and you can find our TS plugin README docs here

If the project has any recommendations for tsconfig.json settings to maximize compatibility, or to avoid incompatibility, that should be noted.

I think the main thing will be that as long as Greenwood's TS plugin support whatever recommendations the library you're using supports, that would our ideal place to be. For example, Lit has recommendations for using decorators in TS, and for sure for something like Lit, we can link out to their recommended settings.

If there are recommendations for configuring Rollup or the any other part of the toolchain for the best user experience, that would be useful as well, even if only as an example.

For Rollup, we do offer a Greenwood plugin API for that, which you can check out here.

If its just transformations you are looking for, in most cases it can probably be solved with a resource plugin. If its specific to CSS we do have a PostCSS plugin, or for JS we have a Babel plugin.


Our next phase of work, once we have the new release and website behind us, will be to focus on overall "ecosystem compat", which would definitely include tasks like this, to better support TypeScript for Greenwood itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Greenwood specific docs feature New feature or request Init
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants