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

init CLI command #94

Open
HeavenVolkoff opened this issue Sep 27, 2022 · 0 comments
Open

init CLI command #94

HeavenVolkoff opened this issue Sep 27, 2022 · 0 comments

Comments

@HeavenVolkoff
Copy link
Contributor

init CLI command with which a new project can be created instead.

The init command then ask:

  • Gjs or node-gtk
  • CJS or ESM

To keep the command from getting too complex we should concentrate on the most important for now, if there is a need for more configuration options we can always introduce them, so e.g. I would make esbuild to the default bundler and not ask for another.

The init command then does the following:

  • Runs npm init
  • Parses the created package.json (in this way we also have the information that was entered)
  • Rebuilds the package.json by
    • Adding some default scripts to the package.json (like build:types, build:app, ..)
    • Adding esbuild to the devDependencies
    • Adding ts-for-gir to the devDependencies (as soon as I have create a new npm package (I think I will name it @ts-for-gir/cli))
  • Creates a tsconfig.json (with your suggestion to exclude the DOM types)
  • Creates a esbuild.js
  • Creates a .ts-for-girrc.js with the chosen
    • environments: "gjs" | "node"
    • moduleType: "esm" | "commonjs"
  • Creates a src/index.ts as the starting point with a simple example

Originally posted by @JumpLink in #72 (comment)

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