The above dependencies could be (not sure which one is better yet):
dependencies declared in the root’s package.json.
devDependencies declared in the root’s package.json.
dependencies declared in the package’s package.json, like @frontity/core.
The project needs a tsconfig.json file. Similar to the one we have in our repo.
When users add a new field to the default package export, like { state: { theme: { some: "field" } } }
TypeScript won’t complain unless there is at least one defined field at the same level. This is probably due to the default definition of state: { state: [key: string]: object }
We need to improve that.
Questions
If users opt-in to use TypeScript (with --typescript or by answering Yes to a Do you want to use TypeScript prompt): should frontity create let them choose only a TypeScript theme? or also a JavaScript theme?
I think this one is already solved. @orballo could you please confirm it? When you run frontity create-package -t , it is not yet implemented the support for this option (and is not explained in the help command, which leads the developer to believe that there is a bug).
I ran this command in frontity 1.4.2 and it doesn’t seem fixed. The command runs without minding my -t, --typescript option. And when running npx frontity create-package --help the -t option is still present.
Oh I thought you were talking about frontity create, not frontity create-package. My bad.
It looks like @david added the option but didn’t implement the feature and I didn’t noticed it in the code review. I’ve done a PR to remove the option until it is implemented.
I was creating a new project, and I think that while there isn’t an available typescript theme (or even if there is one, when I know what I’m doing, I might want to start from zero) there should be an option in frontity create to create a project without any theme installed.
@david and I have just finished a mars-theme-typescript theme which is used automatically when you do npx frontity create with the --typescript option.
This is the PR, which is right now awaiting a review: