Skip to content

Commit

Permalink
Fix pubignore instructions and update extension example app (#6472)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzieschmoll authored Sep 26, 2023
1 parent c900e0d commit 0234cb6
Show file tree
Hide file tree
Showing 20 changed files with 25,911 additions and 25,809 deletions.
3 changes: 2 additions & 1 deletion packages/devtools_extensions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 0.0.7
* Add integration testing.
* Update the `build_and_copy` command to stop copying unnecessary files.
* Add `ExtensionManager.unregisterEventHandler` method.
* Update README.md to include `.pubignore` recommendation.
* Add integration testing.

## 0.0.6
* Bump `package:devtools_app_shared` dependency to version ^0.0.4.
Expand Down
6 changes: 3 additions & 3 deletions packages/devtools_extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ Then publish your package.
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. To do so, add the following to a `.pubignore` file at the root
of your pub package:
when you publish your package. To do so, add the following to a `.pubignore` file in the
`extension/devtools/` directory:

```
!./extension/devtools/build
!./build
```

This will ensure that, even if the `extension/devtools/build` directory has been been git
Expand Down
13 changes: 0 additions & 13 deletions packages/devtools_extensions/bin/_build_and_copy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ class BuildExtensionCommand extends Command {
required String source,
required String dest,
}) async {
_log('Copying the extension config.yaml file into a temp directory...');
final tmp = Directory.current.createTempSync();
final tmpConfigPath = path.join(tmp.path, 'config.yaml');
final destinationConfigPath = path.join(dest, 'config.yaml');
File(destinationConfigPath)..copySync(tmpConfigPath);

_log('Replacing the existing extension build with the new one...');
final sourceBuildPath = path.join(source, 'build', 'web');
final destinationBuildPath = path.join(dest, 'build');
Expand All @@ -109,13 +103,6 @@ class BuildExtensionCommand extends Command {
destinationBuildPath,
);

_log(
'Copying the extension config.yaml file back to the destination '
'directory...',
);
File(tmpConfigPath)..copySync(destinationConfigPath);
tmp.deleteSync(recursive: true);

_log(
'Successfully copied extension assets from '
'"${Directory(source).resolveSymbolicLinksSync()}" to'
Expand Down
16 changes: 8 additions & 8 deletions packages/devtools_extensions/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ This example will show you how to:
1. Structure your package for optimal extension development and publishing
```
foo/ # formerly the repository root of your pub package
packages/
foo/ # your pub package
extension/
devtools/
build/
... # pre-compiled output of foo_devtools_extension
config.yaml
foo_devtools_extension/ # source code for your extension
packages/
foo/ # your pub package
extension/
devtools/
build/
... # pre-compiled output of foo_devtools_extension
config.yaml
foo_devtools_extension/ # source code for your extension
```
2. Configure your extension using the `foo/extension/devtools/config.yaml` file
```yaml
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!./build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7b12972f573eae484947343ce555e94c
8c60270877067c249075063f1ce2ad13
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"DQsHOnBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvL1JvYm90by1CbGFjay50dGYMAQ0BBwVhc3NldAc6cGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG8vUm9ib3RvLUJsYWNrLnR0Zgc5cGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG8vUm9ib3RvLUJvbGQudHRmDAENAQcFYXNzZXQHOXBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvL1JvYm90by1Cb2xkLnR0Zgc6cGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG8vUm9ib3RvLUxpZ2h0LnR0ZgwBDQEHBWFzc2V0BzpwYWNrYWdlcy9kZXZ0b29sc19hcHBfc2hhcmVkL2ZvbnRzL1JvYm90by9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0RwYWNrYWdlcy9kZXZ0b29sc19hcHBfc2hhcmVkL2ZvbnRzL1JvYm90b19Nb25vL1JvYm90b01vbm8tTWVkaXVtLnR0ZgdFcGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG9fTW9uby9Sb2JvdG9Nb25vLVJlZ3VsYXIudHRmDAENAQcFYXNzZXQHRXBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvX01vbm8vUm9ib3RvTW9uby1SZWd1bGFyLnR0ZgdCcGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG9fTW9uby9Sb2JvdG9Nb25vLVRoaW4udHRmDAENAQcFYXNzZXQHQnBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvX01vbm8vUm9ib3RvTW9uby1UaGluLnR0Zg=="
Original file line number Diff line number Diff line change
Expand Up @@ -30109,6 +30109,70 @@ libwebp

Copyright 2018 Google Inc. All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
libwebp

Copyright 2021 Google Inc. All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
libwebp

Copyright 2022 Google Inc. All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Expand Down
Loading

0 comments on commit 0234cb6

Please sign in to comment.