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

Feat/experimetal transpile with swc #18

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

joaoneto
Copy link

@joaoneto joaoneto commented Aug 21, 2023

Pull Request Guidelines

Our guidelines for submitting a pull request.

Before submitting a Pull Request, please make sure you have verified the following:

  • The commit message follows our guidelines:
    • A good commit message should be two things: meaningful and concise. It should not contain every single detail, describing each changed line—we can see all the changes in Git—but, at the same time, it should say enough to avoid ambiguity.
    • We use Microverse's commit message convention
    • The convention stablish that a commit message has to be in the present tense, imperative and lowercase.
    • Example: fix typo in README.md
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Please describe the current behavior that you are modifying, or link to a relevant issue.

Issue Number: N/A

What is the new behavior?

Describe the new behavior or link to a relevant issue.

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications below.

Other information

Added experimental flag for templates (see: #17)

An interactive stdout example:
image

Added cli commands:

This pull request moves the dependencies that used to be in the templates to the CLI, making it essential for the build.
This change simplifies the installation and maintenance of the templates, as they no longer need to have the same dependencies as the CLI. It also allows the CLI to have more control over the build process and use different tools for different tasks.

The pull request adds new dependencies to the expressots-cli package.json file:

  • @swc/cli
  • @swc/core
  • @swc/register
  • concurrently
  • nodemon
  • rimraf
  • ts-node-dev
  • tsconfig-paths

It also adds a new dev dependency:

  • @types/nodemon

The new dependencies can be removed from the templates.

The pull request also adds new commands to the expressots-cli bin file:

  • expressots dev: uses ts-node-dev to start the server and watch for changes in the ./src directory and reload, showing type errors.

  • expressots dev --experimental: uses nodemon in conjunction with tsc and eslint respectively to start the server and watch for changes in the ./src directory and reload and in parallel validate the typing and code style, showing errors.

  • expressots build: uses tsc that look for tsconfig.build.json to transpile a hole project in dist

  • expressots build --experimental: uses concurrently to start types, lint and build (with swc) in parallel, and if one of these tasks fail, the process exit code is an error

Any other information that is important to this PR.

@ghost
Copy link

ghost commented Aug 21, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@rsaz rsaz assigned rsaz and joaoneto and unassigned rsaz Aug 21, 2023
@rsaz rsaz added the enhancement New feature or request label Aug 21, 2023
src/new/cli.ts Outdated Show resolved Hide resolved
src/new/cli.ts Outdated Show resolved Hide resolved
src/new/form.ts Outdated Show resolved Hide resolved
@joaoneto joaoneto force-pushed the feat/experimetal-transpile-with-swc branch 2 times, most recently from 5198fcd to c37ca63 Compare August 23, 2023 02:57
@Daniel-Boll Daniel-Boll self-requested a review August 23, 2023 11:57
Copy link
Contributor

@Daniel-Boll Daniel-Boll left a comment

Choose a reason for hiding this comment

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

LGTM! Great work, loved the refactor of the templates-list.ts, well done!

@Daniel-Boll
Copy link
Contributor

As soon as @juliano-soares approve it, @rsaz may test it on Windows and merge.

@joaoneto joaoneto force-pushed the feat/experimetal-transpile-with-swc branch from 2b45438 to b86b598 Compare October 9, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Draft
Development

Successfully merging this pull request may close these issues.

None yet

3 participants