From b1e8eaffc8569fcd1005a4a6f5d2768649c06c0c Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Tue, 15 Jan 2019 10:48:40 +0100 Subject: Upgrade sonar-docs to gatsby v2 and Typescript * Upgrade to gatsby v2 * Migrate to TS * Add jest tests of some components * Remove glamor --- .../sonar-docs/plugins/sonarsource-source-filesystem/index.js | 8 ++++---- .../plugins/sonarsource-source-filesystem/package.json | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'server/sonar-docs/plugins') 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 = ''; 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" + } } -- cgit v1.2.3