Skip to content

Commit

Permalink
plugins examples: Add customizing-map example
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Dubenko <[email protected]>
  • Loading branch information
sniok committed Nov 27, 2024
1 parent 6d43fe4 commit d025312
Show file tree
Hide file tree
Showing 10 changed files with 36,365 additions and 0 deletions.
29 changes: 29 additions & 0 deletions plugins/examples/customizing-map/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# The output for npm run storybook-book, static html built storybook for the plugin
storybook-static

.eslintcache

5 changes: 5 additions & 0 deletions plugins/examples/customizing-map/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
17 changes: 17 additions & 0 deletions plugins/examples/customizing-map/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
33 changes: 33 additions & 0 deletions plugins/examples/customizing-map/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"problemMatcher": ["$tsc-watch", "$eslint-compact"],
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "test",
"problemMatcher": ["$tsc-watch", "$eslint-compact"],
"isBackground": true,
"presentation": {
"reveal": "always"
},
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
16 changes: 16 additions & 0 deletions plugins/examples/customizing-map/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Example Plugin: Customizing Map

This shows you how to customize Map view with your own Source, Nodes, Edges and Details.

```bash
cd plugins/examples/customizing-map
npm install
npm start
```

The main code for the example plugin is in [src/index.tsx](src/index.tsx).
The code for the plugin settings is in [src/settings.tsx](src/settings.tsx).

See the documentation:

- [Extending the Map](https://headlamp.dev/docs/latest/development/plugins/functionality/extending-the-map)
Loading

0 comments on commit d025312

Please sign in to comment.