chore: converting things to js

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-09-10 16:25:31 +02:00
parent 043972f325
commit 28e2ca1ed8
4 changed files with 9 additions and 12 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ const config: Config = {
docs: {
editUrl: 'https://github.com/backstage/backstage/edit/master/docs/',
path: '../docs',
sidebarPath: 'sidebars.ts',
sidebarPath: 'sidebars.js',
...(useVersionedDocs
? {
includeCurrentVersion: true,
@@ -14,9 +14,9 @@
* limitations under the License.
*/
import sidebars from './sidebars';
const sidebars = require('./sidebars');
export default {
module.exports = {
ci: {
collect: {
url: [
@@ -1,12 +1,9 @@
import fs from 'node:fs';
import path from 'node:path';
const fs = require('fs');
const path = require('path');
const docsDir = path.resolve(
path.dirname(new URL(import.meta.url).pathname),
'../docs',
);
const docsDir = path.resolve(__dirname, '../docs');
export const releases = fs
exports.releases = fs
.readdirSync(path.resolve(docsDir, 'releases'))
.filter(doc => doc.match(/^v\d+\.\d+\.\d+\.md$/))
.map(doc => doc.replace(/\.md$/, ''))
@@ -1,6 +1,6 @@
import { releases } from './releases';
const { releases } = require('./releases');
export default {
module.exports = {
docs: {
Overview: [
'overview/what-is-backstage',