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

Generate example application #16

Closed
1 task done
RyanClementsHax opened this issue Feb 12, 2024 · 1 comment
Closed
1 task done

Generate example application #16

RyanClementsHax opened this issue Feb 12, 2024 · 1 comment
Assignees

Comments

@RyanClementsHax
Copy link
Collaborator

RyanClementsHax commented Feb 12, 2024

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

No

Describe the solution you'd like

Description

Running npx mantis@latest init should create an example todo application using the Mantis stack.

Out of scope

  • Creating a mongo database
  • Taking in a project name

Acceptance criteria

  • npx mantis init should, in order:
    1. Create an example todo application using the Mantis stack.
    2. Install all dependencies
    3. Print instructions for how to then set up the database and run the apps
    4. Stand up the web and mobile applications after installing

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

This is the core behavior of the CLI

@RyanClementsHax RyanClementsHax self-assigned this Feb 12, 2024
RyanClementsHax added a commit that referenced this issue Feb 20, 2024
- generate todo app
- install dependencies after generation
- stand up app after installing
- refactor toward better esm compatibility
    - use unbuild for building (provides automatic .mjs file generation)
    - statically import commands (dynamic import wasn't working as well and wasn't strictly necessary)
- update readme with development instructions

Part of #16
RyanClementsHax added a commit that referenced this issue Feb 20, 2024
- generate todo app
- install dependencies after generation
- stand up app after installing
- refactor toward better esm compatibility
    - use unbuild for building (provides automatic .mjs file generation)
    - statically import commands (dynamic import wasn't working as well and wasn't strictly necessary)
- update readme with development instructions

Part of #16
RyanClementsHax added a commit that referenced this issue Feb 20, 2024
- generate todo app
- install dependencies after generation
- stand up app after installing
- refactor toward better esm compatibility
    - `execa` is esm only which forces us to be esm compatible; we could try to use a different package, but as esm gains adoption, we would have to reconcile with compatibility sooner or later so I ripped off the band-aid early before it becomes a massive issue
    - use unbuild (rollup based build tool) for building since tsc is doesn't easily output esm compatible code
    - statically import commands and actions since dynamically importing them using templated strings as we currently do requires a more complicated build setup
        - we can add this back using extra plugins if it is valuable for us
    - run built cli in development directly as `ts-node` has very poor support for esm in later node versions despite what their docs say
- update readme with development instructions

Part of #16
@RyanClementsHax
Copy link
Collaborator Author

Closed by #17

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

No branches or pull requests

1 participant