Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: enhance readme #59

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,17 @@ Copyright 2017-2023 Staffbase GmbH.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0


<table>
<tr>
<td>
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
</td>
<td>
<b>Staffbase GmbH</b>
<br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
<br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
</td>
</tr>
</table>
<tr>
<td>
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
</td>
<td>
<b>Staffbase GmbH</b>
<br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
<br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
</td>
</tr>
</table>

2 changes: 2 additions & 0 deletions docSrc/buildDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jsdoc2md.render({
const contributionText = retArr[4];
const testText = retArr[5];
const licenseText = retArr[6];
const footerText = retArr[7];

return new Promise( (resolve, reject) => {
fs.readFile(path.join(__dirname, './mainFile.tpl'), (err, mainTpl) => {
Expand All @@ -45,6 +46,7 @@ jsdoc2md.render({
contribution: contributionText,
tests: testText,
license: licenseText,
footer: footerText,
});
// Copy generated markdown file to root folder
fs.writeFile(path.join(__dirname, '../README.MD'), rendered, (err, done) => {
Expand Down
2 changes: 2 additions & 0 deletions docSrc/mainFile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
## License

{{{license}}}

{{{footer}}}
12 changes: 12 additions & 0 deletions docSrc/sections/footer.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<table>
<tr>
<td>
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
</td>
<td>
<b>Staffbase GmbH</b>
<br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
<br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
</td>
</tr>
</table>
14 changes: 14 additions & 0 deletions docSrc/sections/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ module.exports = {
}
});
});
const footerPromise = new Promise( (resolve, reject) => {
fs.readFile(path.join(__dirname, 'footer.tpl'), (err, footerTpl) => {
if (err) {
reject(err);
} else {
const tpl = handlebars.compile(footerTpl.toString());
const rendered = tpl({

});
resolve(rendered);
}
});
});
return Promise.all([
overviewPromise,
installationPromise,
Expand All @@ -112,6 +125,7 @@ module.exports = {
contributionPromise,
testPromise,
licensePromise,
footerPromise,
]);
},
};
2 changes: 1 addition & 1 deletion docSrc/sections/license.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Copyright 2017-2021 Staffbase GmbH.
Copyright 2017-2023 Staffbase GmbH.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0
2 changes: 2 additions & 0 deletions docSrc/sections/usage.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ The following data can be retrieved from the token:

|Helper Name|Token Key| Fetch Function| Description|
| --- | --- | --- | --- |
|CLAIM_BRANCH_ID|branch_id|getBranchId()|Get the branch ID for which the token was issued.|
|CLAIM_BRANCH_SLUG|branch_slug|getBranchSlug()|Get the branch slug for which the token was issued.|
|CLAIM_AUDIENCE|aud|getAudience()|Get targeted audience of the token.|
|CLAIM_EXPIRE_AT|exp|getExpireAtTime()|Get the time when the token expires.|
|CLAIM_NOT_BEFORE|nbf|getNotBeforeTime()|Get the time when the token starts to be valid.|
Expand Down
1 change: 0 additions & 1 deletion docs/API.MD
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Internally used to get value against the client param string.
| --- | --- | --- |
| claimName | String | The claim name as defined in the tokenDataConsts |

**Kind**: instance method of [SSOTokenData](#markdown-header-new-ssotokendatatokenvals)
### ssoTokenData.getBranchId() ⇒ null ⎮ string
Get the branch ID for which the token was issued.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@staffbase/staffbase-plugin-sdk",
"version": "1.3.0",
"version": "1.3.1",
"description": "Staffbase Plugin SDK for Javascript / Node.js",
"main": "./dist/index.js",
"scripts": {
Expand Down
Loading