Skip to content

Commit

Permalink
Miscellaneous fixes in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed Dec 9, 2024
1 parent ee4c829 commit 62f5ad2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 10 additions & 10 deletions documentation/md/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ cytoscape('collection', 'fooBar', function(){
1. Use [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) to create the project's scaffolding. Alternatively, manually generate the project configuration files with your favourite bundler.
1. Use [Babel](https://babeljs.io) if you want to support older browsers with your extension. The `rollup-starter-lib` repo has an example in the [`babel` branch](https://github.com/rollup/rollup-starter-lib/tree/babel).
1. The default export of your extension should be a registration function, e.g.:
```
export default function register(cytoscape){
cytoscape('collection', 'fooBar', fooBarFunction);
}
```
```
export default function register(cytoscape){
cytoscape('collection', 'fooBar', fooBarFunction);
}
```
1. You may want to support automatic registration for consumers who use traditional `<script>` tags to use your extension, i.e.:
```
if(typeof window.cytoscape !== 'undefined'){
register(window.cytoscape);
}
```
```
if(typeof window.cytoscape !== 'undefined'){
register(window.cytoscape);
}
```
1. Document your extension's API in a `README.md` file in the root directory of your respository.
1. [Publish your extension to npm](https://docs.npmjs.com/cli/publish).
1. [Submit a request](https://github.com/cytoscape/cytoscape.js/issues/new?labels=documentation&title=List%20extension%20:%20%3Cyour%20extension%20name%3E&body=Please%20enter%20your%20Github%20URL%20and%20a%20one-line%20description) to have your extension listed in the documentation.
Expand Down
4 changes: 3 additions & 1 deletion documentation/md/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* npm
* yarn
* bower
* jspm
* Supports the [R language](https://www.r-project.org/) via [RCyjs](http://www.bioconductor.org/packages/release/bioc/html/RCyjs.html)
* Supports rendering images of graphs on Node.js with [Cytosnap](https://github.com/cytoscape/cytosnap)
* Has a large suite of tests that can be run in the browser or the terminal
Expand Down Expand Up @@ -50,7 +51,7 @@

* [Amazon](http://amazon.com)
* [Apache Software Foundation](https://apache.org)
* [Duo](https://duo.com)
* [Cisco](https://www.cisco.com)
* [Elastic](https://www.elastic.co/)
* [Fujitsu](https://www.fujitsu.com)
* [GitHub](https://github.com)
Expand Down Expand Up @@ -285,6 +286,7 @@ The library was created at the [Donnelly Centre](http://thedonnellycentre.utoron
## Packages

* npm : `npm install cytoscape`
* yarn : `yarn install cytoscape`
* bower : `bower install cytoscape`
* jspm : `jspm install npm:cytoscape`

Expand Down

0 comments on commit 62f5ad2

Please sign in to comment.