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(cli): add automatic project creation #530

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

Conversation

Thomsr
Copy link
Contributor

@Thomsr Thomsr commented Mar 15, 2023

This pull request adds a new package: cli. This package contains all the command line interfaces that Motion Canvas has.

With this pull request comes the ability to type mc into your terminal and get prompted with several options which consist of the following:

mc
├── add
     ├── scene
     ├── project
     ├── component

This allows the user to create a new scene, project or component with ease.

Closes: #301

@Thomsr
Copy link
Contributor Author

Thomsr commented Mar 15, 2023

My current testing setup is as follows:

test/
└──src/
     ├── scenes/
     └── vite.config.ts

And then call node ..\packages\cli\index.js from inside the test/ directory

I am open to any feedback you might have, please dont hesitate.

Copy link
Contributor

@aarthificial aarthificial left a comment

Choose a reason for hiding this comment

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

I think we should use typescript here.
The create package is kept extremely simple with as little overhead as possible because it needs to be snappy - it's downloaded on demand when npm init is used.
Here, the package will be actually installed globally by the user, so we can have more freedom.

packages/cli/index.js Outdated Show resolved Hide resolved
packages/cli/add/index.js Outdated Show resolved Hide resolved
packages/cli/index.js Outdated Show resolved Hide resolved
packages/cli/utils/createDir.js Outdated Show resolved Hide resolved
packages/cli/utils/createDir.js Outdated Show resolved Hide resolved
packages/cli/package.json Outdated Show resolved Hide resolved
packages/cli/add/commands/project.js Outdated Show resolved Hide resolved
packages/cli/add/commands/project.js Outdated Show resolved Hide resolved
packages/cli/add/commands/project.js Outdated Show resolved Hide resolved
packages/cli/add/commands/project.js Outdated Show resolved Hide resolved
packages/cli/package.json Outdated Show resolved Hide resolved
packages/cli/add/commands/project.js Outdated Show resolved Hide resolved
packages/cli/index.js Outdated Show resolved Hide resolved
packages/cli/add/commands/project.js Outdated Show resolved Hide resolved
@Thomsr
Copy link
Contributor Author

Thomsr commented Mar 19, 2023

I will add the component command later, I think that just scene and project will suffice for now.

@Thomsr Thomsr marked this pull request as ready for review March 30, 2023 17:21
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.

Button for creating new projects in the project selector UI
2 participants