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

New create-panda-app script #19

Open
AdamPuzio opened this issue Nov 24, 2022 · 3 comments
Open

New create-panda-app script #19

AdamPuzio opened this issue Nov 24, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@AdamPuzio
Copy link
Owner

After thinking about how to simplify the introduction process, I've decided to replicate one of the best onboarding tools out there: create-react-app.

The goal: create a script that will generate a new Project by simply typing npx create-panda-app <appname>.

Questions:

  • What will be the default setup for this new project?
  • What parameters can be passed?
  • What should the directory structure look like?
  • How should the CLI utilities be implemented to then allow for the creation of additional entities?
  • What dependencies should be included?
@AdamPuzio AdamPuzio added the enhancement New feature or request label Nov 24, 2022
@AdamPuzio AdamPuzio added this to the v0.3.3 milestone Nov 24, 2022
@AdamPuzio AdamPuzio self-assigned this Nov 24, 2022
@AdamPuzio
Copy link
Owner Author

General thoughts:

Includes:

  • primary files
    • package.json
    • project.json
    • index.js - contains the code to run app via panda
  • starter app
    • routes - single starter page?
    • services - simple, basic services to showcase setup and usage
    • static - includes build files and other static files
    • source - source directory for js/x and scss files to process
    • ui
      • components
      • views
  • dependencies
    • panda
  • dev dependencies
    • build module
    • test module
    • css module
    • lint module
  • scripts
    • start
    • build
    • test
  • tools
    • build tool - webpack or vite
    • test tool - jest
    • css tool - sass
    • lint tool - standardjs

Notes:

  • should the default setup be simple (single starter page) or more complex to show off the capabilities and patterns with routing, services and rendering different ui elements?
  • can we install a CLI as a dev dependency and then call that via a script to allow entities to be created from within the project, but not bloat a non-dev install?
  • how do we create a live instance for development (using source files), but change it to using built files when running in production?
  • should the build directory be a second static directory or build directly in /static?
  • should the default build be a react app or something more simple?

@AdamPuzio
Copy link
Owner Author

Flags:

General:
-i, --interactive: Run setup in interactive mode
This will run the create-panda-app in interactive mode, which prompts you specific questions about how to set up and configure the application.

Project setup:
--setup-type: The level of setup (complete|simple|empty)

App settings:
--port: the port to run the app on (default:5000)
--build-tool: the build tool to use (webpack|vite|gulp)
--test-tool: testing framework to use (jest|mocha)
--css-tool: css preprocessor to use (sass|less)
--lint-tool: linting tool to use (standardjs|jslint|eslint)

@AdamPuzio
Copy link
Owner Author

Other possible includes or configurations (either by default or via flags):

  • docker/kubernetes file
  • storybook
  • ui framework to use (vanilla/react/angular/lit/vue)
  • process manager (pm2/forever)
  • compiler
  • script type (commonJs/ES6)

Potential scaffolding scripts:

  • create-panda-app - create a simple web app
  • create-panda-api - create an API with services
  • create-panda-cli - create a CLI utility
  • create-panda-cms - create a web app with a CMS backend
  • create-panda-dashboard - create a dashboard

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
None yet
Development

No branches or pull requests

1 participant