diff --git a/packages/dart_frog_cli/CONTRIBUTING.md b/packages/dart_frog_cli/CONTRIBUTING.md index 0109224a6..1524c3f86 100644 --- a/packages/dart_frog_cli/CONTRIBUTING.md +++ b/packages/dart_frog_cli/CONTRIBUTING.md @@ -53,18 +53,18 @@ dart test If some tests do not pass out of the box, please submit an [issue](https://github.com/VeryGoodOpenSource/dart_frog/issues/new/choose). -4. Install your own version of Dart Frog CLI in your local environment: +4. If you are modifying any [templates](../../bricks), make sure to bundle them locally before activating: ```sh -# 🚀 Activate your own local version of Dart Frog CLI (from packages/dart_frog_cli) -dart pub global activate --source path . +# 📦 Bundle templates (from root) +sh tool/generate_local_bundles.sh ``` -5. If you are modifying any [templates](../../bricks), make sure to bundle them before activating: +5. Install your own version of Dart Frog CLI in your local environment: ```sh -# 📦 Bundle templates (from root) -tool/generate_bundles.sh +# 🚀 Activate your own local version of Dart Frog CLI (from packages/dart_frog_cli) +dart pub global activate --source path . ``` ### Creating a Pull Request diff --git a/tool/generate_local_bundles.sh b/tool/generate_local_bundles.sh new file mode 100644 index 000000000..98a83507e --- /dev/null +++ b/tool/generate_local_bundles.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Runs `mason bundle` to generate bundles for all bricks within the top level bricks directory. + +# Create Dart Frog Brick +mason bundle bricks/create_dart_frog -t dart -o packages/dart_frog_cli/lib/src/commands/create/templates + +# Development Dart Frog Server Brick +mason bundle bricks/dart_frog_dev_server -t dart -o packages/dart_frog_cli/lib/src/commands/dev/templates + +# Production Dart Frog Server Brick +mason bundle bricks/dart_frog_prod_server -t dart -o packages/dart_frog_cli/lib/src/commands/build/templates + +# Create dart frog routes and middlewares +mason bundle bricks/dart_frog_new -t dart -o packages/dart_frog_cli/lib/src/commands/new/templates + +dart format ./packages/dart_frog_cli \ No newline at end of file