aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/plugins
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-01-15 10:48:40 +0100
committerSonarTech <sonartech@sonarsource.com>2019-01-22 20:21:02 +0100
commitb1e8eaffc8569fcd1005a4a6f5d2768649c06c0c (patch)
treeaee29ea54c3305514f13169aaa71411a5bbc1956 /server/sonar-docs/plugins
parent33946649b9aabb705d4d3aaa90b0b23bbb5f032c (diff)
downloadsonarqube-b1e8eaffc8569fcd1005a4a6f5d2768649c06c0c.tar.gz
sonarqube-b1e8eaffc8569fcd1005a4a6f5d2768649c06c0c.zip
Upgrade sonar-docs to gatsby v2 and Typescript
* Upgrade to gatsby v2 * Migrate to TS * Add jest tests of some components * Remove glamor
Diffstat (limited to 'server/sonar-docs/plugins')
-rw-r--r--server/sonar-docs/plugins/sonarsource-source-filesystem/index.js8
-rw-r--r--server/sonar-docs/plugins/sonarsource-source-filesystem/package.json10
2 files changed, 8 insertions, 10 deletions
diff --git a/server/sonar-docs/plugins/sonarsource-source-filesystem/index.js b/server/sonar-docs/plugins/sonarsource-source-filesystem/index.js
index 7bf46ef2567..ec538038617 100644
--- a/server/sonar-docs/plugins/sonarsource-source-filesystem/index.js
+++ b/server/sonar-docs/plugins/sonarsource-source-filesystem/index.js
@@ -20,6 +20,10 @@
const { createFilePath, createRemoteFileNode } = require('gatsby-source-filesystem');
const fs = require('fs-extra');
+function loadNodeContent(fileNode) {
+ return Promise.resolve(loadNodeContentSync(fileNode));
+}
+
function loadNodeContentSync(fileNode) {
const content = fs.readFileSync(fileNode.absolutePath, 'utf-8');
let newContent = cutSonarCloudContent(content);
@@ -28,10 +32,6 @@ function loadNodeContentSync(fileNode) {
return newContent;
}
-function loadNodeContent(fileNode) {
- return Promise.resolve(loadNodeContentSync(fileNode));
-}
-
function removeRemainingContentTags(content) {
const regexBase = '<!-- \\/?(sonarqube|sonarcloud|static) -->';
return content
diff --git a/server/sonar-docs/plugins/sonarsource-source-filesystem/package.json b/server/sonar-docs/plugins/sonarsource-source-filesystem/package.json
index 03199f7d46f..bd1f6237fc0 100644
--- a/server/sonar-docs/plugins/sonarsource-source-filesystem/package.json
+++ b/server/sonar-docs/plugins/sonarsource-source-filesystem/package.json
@@ -1,12 +1,10 @@
{
"name": "sonarsource-source-filesystem",
- "version": "1.0.0",
- "description": "",
+ "version": "0.0.0",
+ "license": "LGPL-3.0",
+ "private": true,
"main": "create-file-node.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
- },
- "keywords": [],
- "author": "",
- "license": "ISC"
+ }
}