Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/devtools_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
dap: ^1.1.0
dds_service_extensions: ^1.6.0
devtools_app_shared: ^0.0.4
devtools_extensions: ^0.0.5
devtools_extensions: ^0.0.7
devtools_shared: ^4.0.1
file: ^6.0.0
file_selector: ^0.8.0
Expand Down
3 changes: 2 additions & 1 deletion packages/devtools_extensions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.0.7-wip
## 0.0.7
* Add integration testing.
* Add `ExtensionManager.unregisterEventHandler` method.
* Update README.md to include `.pubignore` recommendation.

## 0.0.6
* Bump `package:devtools_app_shared` dependency to version ^0.0.4.
Expand Down
17 changes: 14 additions & 3 deletions packages/devtools_extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ flutter create --template app --platforms web foo_package_devtools_extension

In `foo_package_devtools_extension/pubspec.yaml`, add a dependency on `devtools_extensions`:
```yaml
devtools_extensions: ^0.0.5
devtools_extensions: ^0.0.7
```

In `lib/main.dart`, place a `DevToolsExtension` widget at the root of your app:
Expand Down Expand Up @@ -210,14 +210,25 @@ dart run devtools_extensions build_and_copy \
--dest=path/to/your_pub_package/extension/devtools
```

Then publish your package.

### What if I don't want the `extension/devtools/build/` contents checked into source control?

As a package author, the content that you check into your git repository is completely up to you.
If you want the contents of `extension/devtools/build/` to be git ignored, then you'll just need
to ensure that the extension web app is always built and included in `extension/devtools/build/`
when you publish your package.
when you publish your package. To do so, add the following to a `.pubignore` file at the root
of your pub package:

```
!./extension/devtools/build
Copy link
Member

Choose a reason for hiding this comment

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

@kenzieschmoll
When you put a .pubignore at the root, then the root .gitignore won't be considered at all.

So that might be undesirable... or at least the user will have to duplicate patterns they want in both.

A better option could be to do extensions/devtools/.pubignore that way it's only for the extensions/devtools/.

It won't pollute root, and most likely there is no .gitignore in extensions/devtools anyways.

```

This will ensure that, even if the `extension/devtools/build` directory has been been git
ignored, the directory will still be included when publishing the package on pub.

Consider adding a tool script to your repo that looks something like this:
To verify the published extension contents are always up to date, consider adding a tool
script to your repo that looks something like this:

**publish.sh**
```sh
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!./extension/devtools/build
2 changes: 1 addition & 1 deletion packages/devtools_extensions/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: devtools_extensions
description: A package for building and supporting extensions for Dart DevTools.
version: 0.0.7-wip
version: 0.0.7

repository: https://github.com/flutter/devtools/tree/master/packages/devtools_extensions

Expand Down