svallory / moon-launch

Quickly create moon monorepos in node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moon-launch

Congrats on your new project, powered by Packemon! Here are a few things to know:

  • Packemon is meant for packages (not apps) that will be published to npm.
  • Packages are pre-configured for Node.js environments. Update each package's config to change this.
  • Sources files must be placed in the src folder, while tests in the tests folder.
  • When using a monorepo, packages are located in the <packagesFolder> folder.

Tooling

To improve and automate the developer experience, the following tooling has been automatically installed and pre-configured using moonrepo presets.

Feel free to use the configuration as-is, or to modify, or to not use moon, the choice is yours!

React/Solid support

Scaffolded projects are not configured for these libraries by default, but enabling support is rather simple! Open the following files and remove the // Uncomment if using React/Solid comment and any surrounding comments.

  • root .eslintrc.js (also replace moon/node with moon/browser)
  • every tsconfig.json
  • root tsconfig.options.json

Don't forget to install the dependencies also!

// React
yarn add react react-dom
yarn add --dev @types/react @types/react-dom

// Solid
yarn add solid-js

Commands

The tooling mentioned above can be ran with the following yarn/npm scripts. For example, yarn run build.

Build & deploy

  • build - Build the package(s) with Packemon. Useful for development, as it will only build JavaScript targets. Use pack for distribution.
  • clean - Clean all output targets that were built with Packemon.
  • pack - Clean, build, and validate the package(s) with Packemon. Designed for production and should be ran before a release.
  • release - Pack the package(s), run test checks, and publish to npm! (Release script not configured by Packemon)
  • validate - Validate the package(s), ensuring their package.json is defined correctly.
  • watch - Watch for file changes and rebuild the target package. Useful for development.

Development & testing

  • check - Run the type checker, linter, and testing suite all at once.
  • format - Run Prettier and format all files in the project.
  • lint - Run the linter with ESLint.
  • test, coverage - Run the unit testing suite with Vitest, and optionally with code coverage.
  • type - Run the type checker with TypeScript.

What's next?

Check out the official documentation to learn more!

About

Quickly create moon monorepos in node

License:MIT License


Languages

Language:TypeScript 34.9%Language:JavaScript 22.0%Language:Shell 18.4%Language:Marko 12.7%Language:Astro 12.0%