-
Notifications
You must be signed in to change notification settings - Fork 5
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 template for tsconfig.json #145
base: main
Are you sure you want to change the base?
Conversation
Hey port can you share the repo(extension) where you have the |
Could you please take a look at this table? We added it recently. Looks like you can use a raw object instead of a stringified and maybe simplify some logic |
Hey thanks for the comments, and I somehow did not receive a notif about Shiv's comment. So here is the repo: Maybe we should remove include, exclude and paths and keep the other two? lol this was difficult, lmk if i did anything wrong here |
Update it please, params of extension are different from this pr
Thinking without checking, but I think this should work
where |
Thanks! Could you please check again to see if i got it right? @rin-st I have also updated the example args file |
Thanks @portdeveloper ! Added some comments. Also, you can test resulting template for example with this defaults
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! But don't merge it for now, let's wait also Shiv or Carlos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm @portdeveloper I think you forgot to update https://github.com/portdeveloper/test-tsconfig-ext/blob/main/extension/packages/nextjs/tsconfig.json.args.mjs ?
I am just trying to understand what extra tsConfig things we need and maybe we can set them as default in main SE-2 (for eg last time we switched "moduleResolution": "Bundler"
by default in SE-2 for better working with all extensions)
Also I think you are working on pwa extension right, so maybe can you add all the required .template.mjs
in this PR itself?
@technophile-04 And there doesn't seem to be anything an extension-builder can add besides more plugins and more compiler options? I have updated https://github.com/portdeveloper/test-tsconfig-ext/blob/main/extension/packages/nextjs/tsconfig.json.args.mjs too |
yeah true lol there not other options to add, also for pwa do you need any other more template file like |
We also need these:
Should I get the manifest.json and getMetadata in this PR as well? |
Yes could you do that please? Regarding this :
I think we need to update main SE-2 repo with Thanks @portdeveloper!! |
Sorry for the continued confusion on this. I think that won't be necessary! Because I am using the Let me quickly update that as well. |
Ohh I see! I think last time I tried using PS: I am replying to my own comment because Port replied to og comment by editing it 🤣 |
I am never gonna work under the sun again :(((((( i was like why does it say technophile there this should be a bug lmaooo |
Hey just added a commit for the manifest.json file, and hopefully I am not editing anyone's message hehe. args.mjs i used to test things: Had to make iconPath optional as that is not needed in the pwa template. |
Honestly, I don't understand how to templatize getMetadata.ts and how to use stringify. I am so confused lol |
const contents = ({ name, description, iconPath, extraContent }) => stringify({ | ||
name: name[0], | ||
description: description[0], | ||
...(iconPath[0] && { iconPath: iconPath[0] }), // Only include iconPath if it's provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If extension developer doesn't pass the iconPath it will default to "logo.svg" right? So we don't need this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think instead of icon, we are gonna have icons, like the example below:
https://github.com/serwist/serwist/blob/main/examples/next-web-push/public/manifest.json
So, we don't need the icon if the dev does not provide it.
@@ -14,7 +17,7 @@ export const getMetadata = ({ | |||
description: string; | |||
imageRelativePath?: string; | |||
}): Metadata => { | |||
const imageUrl = `${baseUrl}${imageRelativePath}`; | |||
const imageUrl = \`\${baseUrl}\${imageRelativePath}\`; | |||
|
|||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Added a template for
tsconfig.json
file to the project templates.Changes
tsconfig.json
template file, removed tsconfig.jsonTesting
To-Do