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

docs: improve contributing experience when generating bundles #666

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/dart_frog_cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions tool/generate_local_bundles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Runs `mason bundle` to generate bundles for all bricks within the top level bricks directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid to generate bundles locally because felangel/mason#781


# 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