create-foxglove-extension
Advanced tools
Comparing version 0.5.1 to 0.6.0
@@ -51,2 +51,4 @@ "use strict"; | ||
"eslint-plugin-react", | ||
"eslint-plugin-filenames", | ||
"eslint-plugin-es", | ||
"eslint", | ||
@@ -56,3 +58,3 @@ "prettier", | ||
"react", | ||
"typescript@4.6.x", | ||
"typescript", | ||
]; | ||
@@ -59,0 +61,0 @@ async function createCommand(options) { |
@@ -48,2 +48,16 @@ "use strict"; | ||
extensions: [".js", ".ts", ".jsx", ".tsx"], | ||
// The spirit of our fallback configuration is to do the expected thing when encountering a | ||
// native nodejs require. | ||
// | ||
// i.e. It wouldn't be surprising the `fs` module doesn't work since there's no file system in | ||
// extensions but it would be surprising the `path` doesn't work since thats just string | ||
// manipulation. | ||
fallback: { | ||
path: require.resolve("path-browserify"), | ||
// Since extensions don't have file-system access we disable any fallback for importing `fs` | ||
// This improves the out-of-the-box experience when importing files that require('fs') (i.e. | ||
// generated emscripten js loaders) without having to make a custom configuration to disable | ||
// fs fallback. | ||
fs: false, | ||
}, | ||
}, | ||
@@ -50,0 +64,0 @@ module: { |
{ | ||
"name": "create-foxglove-extension", | ||
"version": "0.5.1", | ||
"version": "0.6.0", | ||
"publisher": "foxglove", | ||
@@ -33,3 +33,3 @@ "description": "Create and package Foxglove Studio extensions", | ||
"prepack": "yarn build", | ||
"prepublishOnly": "yarn lint:ci", | ||
"prepublishOnly": "yarn lint:ci && yarn test", | ||
"test": "jest", | ||
@@ -75,3 +75,4 @@ "watch": "tsc --watch" | ||
"ncp": "2.0.0", | ||
"node-fetch": "^2.6.1", | ||
"node-fetch": "2.6.1", | ||
"path-browserify": "1.0.1", | ||
"rimraf": "3.0.2", | ||
@@ -78,0 +79,0 @@ "sanitize-filename": "1.6.3", |
@@ -7,3 +7,3 @@ # create-foxglove-extension | ||
[Foxglove Studio](https://github.com/foxglove/studio) allows developers to create extensions, or custom code that is loaded and executed inside the Foxglove Studio application. This can be used to add custom panels, and in the future it will support custom file formats or data sources and more. Extensions are authored in TypeScript using the `@foxglove/studio` SDK. | ||
[Foxglove Studio](https://github.com/foxglove/studio) allows developers to create extensions, or custom code that is loaded and executed inside the Foxglove Studio application. This can be used to add custom panels. Extensions are authored in TypeScript using the `@foxglove/studio` SDK. | ||
@@ -60,5 +60,5 @@ ## Creating Your First Extension | ||
## Example Panels | ||
## Examples | ||
You can find examples of different kinds of extension panels in the `./examples` directory. | ||
You can find examples of different kinds of extensions in the `./examples` directory. | ||
@@ -65,0 +65,0 @@ ## Stay in touch |
# ${NAME} | ||
## _A Foxglove Studio Extension_ | ||
[Foxglove Studio](https://github.com/foxglove/studio) allows developers to create extensions, or custom code that is loaded and executed inside the Foxglove Studio application. This can be used to add custom panels. Extensions are authored in TypeScript using the `@foxglove/studio` SDK. | ||
## Develop | ||
Extension development uses the `npm` package manager to install development dependencies and run build scripts. | ||
To install extension dependencies, run `npm` from the root of the extension package. | ||
```sh | ||
npm install | ||
``` | ||
To build and install the extension into your local Foxglove Studio desktop app, run: | ||
```sh | ||
npm run local-install | ||
``` | ||
Open the `Foxglove Studio` desktop (or `ctrl-R` to refresh if it is already open). Your extension is installed and available within the app. | ||
## Package | ||
Extensions are packaged into `.foxe` files. These files contain the metadata (package.json) and the build code for the extension. | ||
Before packaging, make sure to set `name`, `publisher`, `version`, and `description` fields in _package.json_. When ready to distribute the extension, run: | ||
```sh | ||
npm run package | ||
``` | ||
This command will package the extension into a `.foxe` file in the local directory. | ||
## Publish | ||
You can publish the extension for the public marketplace or privately for your organization. | ||
See documentation here: https://foxglove.dev/docs/studio/extensions/publish#packaging-your-extension |
import { ExtensionContext } from "@foxglove/studio"; | ||
import { initExamplePanel } from "./ExamplePanel"; | ||
export function activate(extensionContext: ExtensionContext) { | ||
export function activate(extensionContext: ExtensionContext): void { | ||
extensionContext.registerPanel({ name: "example-panel", initPanel: initExamplePanel }); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
79777
1012
11
+ Addedpath-browserify@1.0.1
+ Addednode-fetch@2.6.1(transitive)
+ Addedpath-browserify@1.0.1(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updatednode-fetch@2.6.1