Skip to content

Commit

Permalink
migrates to kanbn after its ESM-restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Bachmann committed Oct 22, 2024
1 parent 51e037d commit b10702b
Show file tree
Hide file tree
Showing 11 changed files with 10,715 additions and 23,366 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.vsix
2 changes: 1 addition & 1 deletion ext-src/KanbnBoardPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as vscode from 'vscode'
import getNonce from './getNonce'
import KanbnTaskPanel from './KanbnTaskPanel'
import KanbnBurndownPanel from './KanbnBurndownPanel'
import { Kanbn } from '@basementuniverse/kanbn/src/main'
import { Kanbn } from '@basementuniverse/kanbn'

const sortByFields: Record<string, string> = {
Name: 'name',
Expand Down
2 changes: 1 addition & 1 deletion ext-src/KanbnBurndownPanel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'path'
import * as vscode from 'vscode'
import getNonce from './getNonce'
import { Kanbn } from '@basementuniverse/kanbn/src/main'
import { Kanbn } from '@basementuniverse/kanbn'

export default class KanbnBurndownPanel {
private static readonly viewType = 'react'
Expand Down
2 changes: 1 addition & 1 deletion ext-src/KanbnStatusBarItem.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Kanbn } from '@basementuniverse/kanbn/src/main'
import { Kanbn } from '@basementuniverse/kanbn'
import * as vscode from 'vscode'

export default class KanbnStatusBarItem {
Expand Down
2 changes: 1 addition & 1 deletion ext-src/KanbnTaskPanel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'path'
import * as vscode from 'vscode'
import getNonce from './getNonce'
import { Kanbn } from '@basementuniverse/kanbn/src/main'
import { Kanbn } from '@basementuniverse/kanbn'

function transformTaskData (
taskData: any,
Expand Down
10 changes: 5 additions & 5 deletions ext-src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import * as path from 'path'
import KanbnStatusBarItem from './KanbnStatusBarItem'
import KanbnBoardPanel from './KanbnBoardPanel'
import KanbnBurndownPanel from './KanbnBurndownPanel'
import { Kanbn } from '@basementuniverse/kanbn/src/main'
import { Kanbn } from '@basementuniverse/kanbn'
import * as fs from 'fs'

export async function activate(context: vscode.ExtensionContext): Promise<void> {
export async function activate (context: vscode.ExtensionContext): Promise<void> {
const kanbnStatusBarItem: KanbnStatusBarItem = new KanbnStatusBarItem(context, null)
const boardCache = new Map<string, KanbnTuple>()
class KanbnTuple {
kanbn: Kanbn
kanbnBoardPanel: KanbnBoardPanel
kanbnBurnDownPanel: KanbnBurndownPanel
constructor(boardLocation: string) {
constructor (boardLocation: string) {
if (vscode.workspace.workspaceFolders == null) {
throw new Error('A workspace folder should be open when creating Kanbn board panels')
}
Expand All @@ -32,7 +32,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
}
}

async function chooseBoard(reuseActiveBoard = true): Promise<string | undefined> {
async function chooseBoard (reuseActiveBoard = true): Promise<string | undefined> {
if (boardCache.size === 0) {
void vscode.window.showErrorMessage(
'No boards detected. Open a workspace with Kanbn boards or add Additional Boards to the global user configuration'
Expand Down Expand Up @@ -73,7 +73,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
return boardId
}

function populateBoardCache(): void {
function populateBoardCache (): void {
const boardLocations = new Set<string>()

// Get globally accessible board locations.
Expand Down
Loading

0 comments on commit b10702b

Please sign in to comment.