Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
patch doctor script, and remove some other issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Oct 12, 2023
1 parent 1c5b8d7 commit 9dbcc97
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions scripts/doctor/files.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { glob } from 'glob';
import { globSync } from '../shared/fileHelpers';

export async function fileChecker() {
const fileList = await new Promise((resolve) => {
glob('./{src,src-webviews,resources}/**/*', (err, files) => {
globSync('./{src,src-webviews,resources}/**/*', (err, files) => {
if (err) {
return resolve(files);
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/doctor/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs';
import { glob } from 'glob';
import path from 'path';
import { fileChecker } from './files.js';
import { verifyFileNames } from '../fileChecker/index.js';
import { globSync } from '../shared/fileHelpers.js';

function sanitizePath(p) {
return p.replace(/\\/g, '/');
Expand Down Expand Up @@ -56,7 +56,7 @@ async function cleanup() {

let badFiles = [];
badFiles = await new Promise((resolve) => {
glob('./{src,src-webviews}/core/**/*.js', (err, files) => {
globSync('./{src,src-webviews}/core/**/*.js', (err, files) => {
if (err) {
return resolve(files);
}
Expand All @@ -72,7 +72,7 @@ async function cleanup() {
}
}

const badFileTypeDefs = glob.sync('./src/**/*.d.ts', { platform: 'linux' });
const badFileTypeDefs = globSync('./src/**/*.d.ts');
for (const file of badFileTypeDefs) {
if (fs.existsSync(file)) {
console.log(`Removed File: ${file}`);
Expand Down
5 changes: 2 additions & 3 deletions scripts/documentation/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import path from 'path';
import fs from 'fs';
import { glob } from 'glob';
import { writeFile } from '../shared/fileHelpers.js';
import { globSync, writeFile } from '../shared/fileHelpers.js';

const docsPath = join(process.cwd(), './docs');
const filesToRemove = ['.nojekyll', 'modules.md', 'README.md'];
const files = glob.sync(join(docsPath, '/**/*.md'), { platform: 'linux' });
const files = globSync(join(docsPath, '/**/*.md'));

/**
*
Expand Down
2 changes: 1 addition & 1 deletion scripts/plugins/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function moveAssetsToWebview(folderName, extensions) {
}

const fullPath = sanitizePath(path.join(pluginFolder, `${folderName}/**/*.+(${extensions.join('|')})`));
const allFiles = globSync(fullPath, { platform: 'linux' });
const allFiles = globSync(fullPath);

for (let i = 0; i < allFiles.length; i++) {
const filePath = allFiles[i];
Expand Down
2 changes: 1 addition & 1 deletion scripts/runtime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async function refreshFileWatching() {
}

// grab all new files
const files = globSync('./src/**/*.ts', { platform: 'linux' });
const files = globSync('./src/**/*.ts');

// ignore `/athena/server` && `/athena/client` directories
previousGlobFiles = files.filter((fileName) => {
Expand Down

0 comments on commit 9dbcc97

Please sign in to comment.