Skip to content

Commit 4f2edd4

Browse files
authored
Merge pull request #59 from Staffbase/NFS-000-enhance-readme
2 parents dfe0f92 + 40a5b6d commit 4f2edd4

File tree

9 files changed

+46
-14
lines changed

9 files changed

+46
-14
lines changed

README.MD

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,17 @@ Copyright 2017-2023 Staffbase GmbH.
186186

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

189+
189190
<table>
190-
<tr>
191-
<td>
192-
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
193-
</td>
194-
<td>
195-
<b>Staffbase GmbH</b>
196-
<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>
197-
<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>
198-
</td>
199-
</tr>
200-
</table>
191+
<tr>
192+
<td>
193+
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
194+
</td>
195+
<td>
196+
<b>Staffbase GmbH</b>
197+
<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>
198+
<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>
199+
</td>
200+
</tr>
201+
</table>
201202

docSrc/buildDoc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jsdoc2md.render({
3030
const contributionText = retArr[4];
3131
const testText = retArr[5];
3232
const licenseText = retArr[6];
33+
const footerText = retArr[7];
3334

3435
return new Promise( (resolve, reject) => {
3536
fs.readFile(path.join(__dirname, './mainFile.tpl'), (err, mainTpl) => {
@@ -45,6 +46,7 @@ jsdoc2md.render({
4546
contribution: contributionText,
4647
tests: testText,
4748
license: licenseText,
49+
footer: footerText,
4850
});
4951
// Copy generated markdown file to root folder
5052
fs.writeFile(path.join(__dirname, '../README.MD'), rendered, (err, done) => {

docSrc/mainFile.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@
2727
## License
2828

2929
{{{license}}}
30+
31+
{{{footer}}}

docSrc/sections/footer.tpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<table>
2+
<tr>
3+
<td>
4+
<img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
5+
</td>
6+
<td>
7+
<b>Staffbase GmbH</b>
8+
<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>
9+
<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>
10+
</td>
11+
</tr>
12+
</table>

docSrc/sections/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ module.exports = {
104104
}
105105
});
106106
});
107+
const footerPromise = new Promise( (resolve, reject) => {
108+
fs.readFile(path.join(__dirname, 'footer.tpl'), (err, footerTpl) => {
109+
if (err) {
110+
reject(err);
111+
} else {
112+
const tpl = handlebars.compile(footerTpl.toString());
113+
const rendered = tpl({
114+
115+
});
116+
resolve(rendered);
117+
}
118+
});
119+
});
107120
return Promise.all([
108121
overviewPromise,
109122
installationPromise,
@@ -112,6 +125,7 @@ module.exports = {
112125
contributionPromise,
113126
testPromise,
114127
licensePromise,
128+
footerPromise,
115129
]);
116130
},
117131
};

docSrc/sections/license.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Copyright 2017-2021 Staffbase GmbH.
1+
Copyright 2017-2023 Staffbase GmbH.
22

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

docSrc/sections/usage.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ The following data can be retrieved from the token:
5454

5555
|Helper Name|Token Key| Fetch Function| Description|
5656
| --- | --- | --- | --- |
57+
|CLAIM_BRANCH_ID|branch_id|getBranchId()|Get the branch ID for which the token was issued.|
58+
|CLAIM_BRANCH_SLUG|branch_slug|getBranchSlug()|Get the branch slug for which the token was issued.|
5759
|CLAIM_AUDIENCE|aud|getAudience()|Get targeted audience of the token.|
5860
|CLAIM_EXPIRE_AT|exp|getExpireAtTime()|Get the time when the token expires.|
5961
|CLAIM_NOT_BEFORE|nbf|getNotBeforeTime()|Get the time when the token starts to be valid.|

docs/API.MD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ Internally used to get value against the client param string.
112112
| --- | --- | --- |
113113
| claimName | String | The claim name as defined in the tokenDataConsts |
114114

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@staffbase/staffbase-plugin-sdk",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Staffbase Plugin SDK for Javascript / Node.js",
55
"main": "./dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)