@staffbase/create-staffbase-plugin 1.0.1 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +1 -1
- package/.github/CODEOWNERS +9 -0
- package/.github/dependabot.yml +52 -0
- package/.github/workflows/auto-merge.yml +10 -0
- package/README.MD +25 -7
- package/csss.js +1 -1
- package/docs/assets/images/staffbase.png +0 -0
- package/package.json +28 -16
- package/scaffoldTpl/README.MD +2 -2
- package/scaffoldTpl/bin/www +5 -3
- package/scaffoldTpl/package-lock.json +1300 -0
- package/scaffoldTpl/package.json +5 -5
- package/scaffoldTpl/views/index.html +8 -8
- package/scaffoldTpl/views/plugin.pug +6 -0
- package/scripts/genDoc.js +3 -3
- package/.travis.yml +0 -5
- package/greenkeeper.json +0 -10
package/scaffoldTpl/package.json
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"start": "node ./bin/www"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@staffbase/staffbase-plugin-sdk": "
|
|
10
|
-
"body-parser": "~1.19.
|
|
9
|
+
"@staffbase/staffbase-plugin-sdk": "^1.3.1",
|
|
10
|
+
"body-parser": "~1.19.2",
|
|
11
11
|
"cookie-parser": "~1.4.5",
|
|
12
|
-
"debug": "~4.
|
|
13
|
-
"express": "~4.17.
|
|
12
|
+
"debug": "~4.3.1",
|
|
13
|
+
"express": "~4.17.3",
|
|
14
14
|
"morgan": "~1.10.0",
|
|
15
|
-
"pug": "
|
|
15
|
+
"pug": ">=3.0.1",
|
|
16
16
|
"serve-favicon": "~2.5.0"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -15,11 +15,11 @@ plugin server. The following values need to be configured.</p>
|
|
|
15
15
|
the values in the <code>app.js</code> file where the middleware is initialized.</p>
|
|
16
16
|
<p>To configure values in <code>app.js</code> file, change the following lines:</p>
|
|
17
17
|
<p>app.js</p>
|
|
18
|
-
<pre><code class="language-javascript"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
<pre><code class="language-javascript">12 ...
|
|
19
|
+
13 ...
|
|
20
|
+
14 const key = null;
|
|
21
|
+
15 const pluginID = null;
|
|
22
|
+
16 ...
|
|
23
23
|
</code></pre>
|
|
24
24
|
<p>You can also specify these values using environment variables.
|
|
25
25
|
Refer to the table to see which environment variables can be used.</p>
|
|
@@ -49,12 +49,12 @@ Refer to the table to see which environment variables can be used.</p>
|
|
|
49
49
|
<p><em>create-staffbase-plugin</em> installs the project dependencies for you.
|
|
50
50
|
After configurations is done, the only thing you need to do is navigate to the
|
|
51
51
|
folder where your app was generated and start the express server.</p>
|
|
52
|
-
<pre><code class="language-bash">$
|
|
52
|
+
<pre><code class="language-bash">$ cd [path of generated app]
|
|
53
53
|
$ npm start
|
|
54
54
|
</code></pre>
|
|
55
55
|
<h2>Further Reading</h2>
|
|
56
56
|
<p>For getting more information about Staffbase SSO, please check out the following links:</p>
|
|
57
57
|
<ul>
|
|
58
|
-
<li><a href="
|
|
59
|
-
<li><a href="
|
|
58
|
+
<li><a href="https://developers.staffbase.com/concepts/customplugin-overview/">Developer Portal: Custom Plugins</a></li>
|
|
59
|
+
<li><a href="https://github.com/Staffbase/plugins-sdk-nodejs/blob/master/README.MD">Staffbase Plugins SDK for Node.js</a></li>
|
|
60
60
|
</ul>
|
package/scripts/genDoc.js
CHANGED
|
@@ -3,10 +3,10 @@ const fs = require('fs-extra');
|
|
|
3
3
|
const hljs = require('highlight.js');
|
|
4
4
|
|
|
5
5
|
const md = require('markdown-it')({
|
|
6
|
-
highlight: function(str
|
|
7
|
-
if (
|
|
6
|
+
highlight: function(str) {
|
|
7
|
+
if (str && hljs.getLanguage(str)) {
|
|
8
8
|
try {
|
|
9
|
-
return hljs.highlight(
|
|
9
|
+
return hljs.highlight(str, true).value;
|
|
10
10
|
} catch (err) {
|
|
11
11
|
console.log(err);
|
|
12
12
|
}
|
package/.travis.yml
DELETED