Skip to content

Conversation

@mdjastrzebski
Copy link
Collaborator

@mdjastrzebski mdjastrzebski commented Oct 2, 2024

image

Summary

Supports following types of templates:

  • NPM package names
  • local folders (stars with ./ ../, /, or file://)
  • local .tgz files

Also performs some basic template-edition:

  • tweaks packageJson to make sense for a new app vs template package.json
  • renames: gitignore to .gitignore

Test plan

Added e2e tests existing the app and checking some basic details like package name, etc

@mdjastrzebski mdjastrzebski force-pushed the feat/create-app/download-template-from-npm branch 2 times, most recently from a6406a9 to 50ea4d7 Compare October 3, 2024 13:12
@mdjastrzebski mdjastrzebski changed the title feat: create app/download template from npm [WIP] feat: create app/download template from npm Oct 3, 2024
@mdjastrzebski mdjastrzebski force-pushed the feat/create-app/download-template-from-npm branch 2 times, most recently from 839cdd5 to 63517f5 Compare October 5, 2024 15:21
}
},
"test": {
"dependsOn": ["build"]
Copy link
Contributor

Choose a reason for hiding this comment

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

why tests depend on build? is this because of vite?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because there are e2e tests, which invoke node packages/create-app/dist/... binary for create-app. Without build step this binary would not exist.

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn’t there be a separate job for unit and e2e tests then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's all jest

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

now vitest actually

packageJson.version = '1.0.0';
packageJson.private = true;

function walk(current: string): string[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

where's this logic? we don't only need to rename stuff package.json. It's mostly about rewriting "HelloWorld" placeholder in native files and filenames

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

restored previous edit template code

@thymikee
Copy link
Contributor

thymikee commented Oct 8, 2024

Let's rebase and merge 👍🏼

chore:

refactor: tweaks

chore: basic e2e tests

chore: add build req to project

chore: fix ci

chore: fix ci

chore: diagnose ci

chore: fix ci

chore: fix ci

chore: fix ci

refactor: improve tests

refactor: improve test helpers

chore: revert ci script changes

chore: a

chore: cleanup

refactor: cleanup

chore: cleanup

chore: cleanup

refactor: self code review

chore: restore test target dep on build

refactor: modify post copy template changes

refactor: self code review

refactor: self code review

refactor: restore previous renaming code

refactor: self code review
@mdjastrzebski mdjastrzebski force-pushed the feat/create-app/download-template-from-npm branch from ee22f8f to 004c3dc Compare October 8, 2024 13:03
@mdjastrzebski mdjastrzebski changed the title feat: create app/download template from npm feat(create-app): download template from npm Oct 8, 2024
@mdjastrzebski mdjastrzebski merged commit 0a9c2c5 into main Oct 8, 2024
1 check passed
@mdjastrzebski mdjastrzebski deleted the feat/create-app/download-template-from-npm branch October 8, 2024 13:06
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