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 app-template-preact-typescript #1238

Merged

Conversation

smashercosmo
Copy link
Contributor

Changes

Implements #1217

@smashercosmo smashercosmo requested a review from a team as a code owner October 7, 2020 13:30
@vercel
Copy link

vercel bot commented Oct 7, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/1221dz4vs
✅ Preview: https://snowpack-git-app-template-preact-typescript.pikapkg.vercel.app

@@ -0,0 +1,43 @@
{
"name": "@snowpack/app-template-preact-typescript",
"version": "1.10.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be 1.0.0?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make it 1.0.0, yeah. Admittedly the version numbers for the templates have gone through a bit of thrashing with our migration into the Snowpack monorepo, as Lerna bumps them for dependency changes and Snowpack changes.

src: '/_dist_',
},
plugins: [
'@snowpack/plugin-dotenv',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe be we should remove @snowpack/plugin-dotenv from all templates, because it's not actually being used?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could do a better job at communicating this, but the idea is to match parity with Create React App as much as possible. But, agreed that this may be better suited as "documenting how easy it is to add this plugin" vs. "added for everyone, by default".

Lets leave it in for this PR to match all others, but great call out.

@@ -0,0 +1,23 @@
{
"include": ["src", "types"],
"exclude": ["node_modules"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "exclude": ["node_modules"] can be removed from all tsconfigs in all typescript templates

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call. If you wanted to remove that as part of this PR, I’d be fine with that.

"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@prefresh/snowpack": "^2.0.1",
"@snowpack/app-scripts-preact": "^1.9.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to remove @snowpack/app-scripts-preact from dependencies and move jest.config to the template?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we’re heading in that direction, but the Jest configuration is just annoying enough where I think it’s better to leave app-scripts-preact as-is for now. However, we may be able to ditch it when #1197 gets a little further! But for this PR I think this is fine for now.

@drwpow
Copy link
Collaborator

drwpow commented Oct 7, 2020

Hey @smashercosmo! Thanks for adding this template. Our test suite failed because you need to add the Snapshot to our test suite (this ensures the template builds as expected throughout changes). To update it, run yarn test -u and commit the new Snapshot.

declare module '*.avif' {
const ref: string;
export default ref;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link
Collaborator

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Would love it if you’re able to update the snapshot and confirm the test suite is passing before merging. But if needed, I can also merge as-is and do it afterward. Just let me know!

@smashercosmo
Copy link
Contributor Author

When I run yarn test -u I get 71 failed tests. Is it ok?

@FredKSchott
Copy link
Owner

@smashercosmo 71 failed tests doesn't sound right, but I can confirm that our test suite was broken on master overnight. If you rebase on master, you should now see CI passing.

@smashercosmo
Copy link
Contributor Author

Ok. Done. The problem was that I didn't build before running tests.

Copy link
Owner

@FredKSchott FredKSchott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

3 participants