website/blog/2022-09-13_v0.14.mdx
import Image from '@site/src/components/Image';
With this release, we've landed some new features that have been requested multiple times since launch. A code generation and template scaffolding layer, as well as implicit dependency scanning for the project graph!
<!--truncate-->moon generate commandCode generation is the staple of any large company or repository. Want to spin up a new application?
What about an npm package? Or maybe third-party integrations? Avoid copy-and-pasting existing code,
and instead generate it with the new moon generate command, which is powered by our new generator
system.
The generator will locate a template by name on the file system ("npm-package" in the example below), prompt and interpolate variables, render the files with Tera (a Rust based template engine), and write the files to the target destination.
# Generate code from a template to a target directory
$ moon generate npm-package ./packages/example
Learn more about code generation in the official guide!
This has been a request since moon's official release, and it's finally here! Up until now, if you
wanted project-to-project dependency relationships, you had to explicitly declare them with
dependsOn. But thanks to a
ton of
infrastructure and
platform changes, we can now infer implicit
dependencies automatically!
We still suggest using explicit dependencies, as it provides more automation like project syncing, but implicit is great for adoption and migration purposes.
We're fans of continuous and easily accessible feedback, and as such, have released a new GitHub
action, moonrepo/run-report-action,
which reports the results of moon ci as a pull request comment. The report
looks something like the following:
<Image src={require('../static/img/github/run-report.png')} width="60%" />
View the official release for a full list of changes.
moon setup to also install Node.js dependencies.Expect the following in the v0.15 release!