Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed May 14, 2022
1 parent cccefc6 commit 1c233c3
Show file tree
Hide file tree
Showing 9 changed files with 1,095 additions and 3,506 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/jsdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitHub pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build
uses: andstor/jsdoc-action@v1
with:
source_dir: ./src
output_dir: ./out
config_file: jsdocconf.json
template: tui-jsdoc-template
front_page: README.md

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./out
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Dependency directories
node_modules/
jspm_packages/
jspm_packages/
out/
package-lock.json
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# lib IITC manager

Library for managing IITC and plugins.

## Getting started

```
npm install lib-iitc-manager --save
```

## Usage

Example code to use in WebExtension.
Imports the library, passes environment parameters and starts loading IITC and plugins.

```js
import { Manager } from 'lib-iitc-manager';

const manager = new Manager({
storage: browser.storage.local,
message: (message, args) => {
console.log("Message for user:");
console.log(message+", args: "+args);
},
progressbar: is_show => {
if (is_show) {
console.log("Show progress bar");
} else {
console.log("Hide progress bar");
}
},
inject_user_script: code => {
console.log("Code of UserScript plugin for embedding in a page:");
console.log(code);
}
});

manager.run().then();
```

Example of use helpers:

```js
import { getUniqId } from "lib-iitc-manager";

const uniqId = getUniqId("tmp");
```

[See more in documentation](TODO)

## License

[GPL-3.0 license](/LICENSE)
21 changes: 21 additions & 0 deletions jsdoc-conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"plugins": ["plugins/markdown"],
"markdown": {
"parser": "gfm",
"hardwrap": false
},
"templates": {
"name": "lib iitc manager",
"footerText": "Ingress Intel Total Conversion (Community Edition)",
"logo": {
"height": "0",
"link": "https://github.com/IITC-CE/lib-iitc-manager"
}
},
"opts": {
"encoding": "utf8",
"private": true,
"recurse": true,
"package": "package.json"
}
}
Loading

0 comments on commit 1c233c3

Please sign in to comment.