Skip to content

Commit

Permalink
#10 refactor move utils functions to common
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankll committed Dec 27, 2023
1 parent 6f09c79 commit 1ec547b
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions src/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './customError';
export * from './debounceThrottle';
export * from './debug';
export * from './pureObject';
export * from './searchTokensProvider';
2 changes: 1 addition & 1 deletion src/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain, shell } f
import path from 'path';
import install, { VUEJS_DEVTOOLS } from 'electron-devtools-assembler';
import { createMenu } from './menu';
import { debug } from '../common/debug';
import { debug } from '../common';
import { githubLink } from '../config';
import Store from 'electron-store';
import { registerStoreApiListener } from './storeApi';
Expand Down
2 changes: 1 addition & 1 deletion src/electron/sourceFIleApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Electron from 'electron';
import { readFile, writeFile, mkdir } from 'fs/promises';
import { existsSync } from 'fs';
import path from 'path';
import { debug } from '../common/debug';
import { debug } from '../common';

export enum sourceFileApiMethods {
SAVE_FILE = 'SAVE_FILE',
Expand Down
3 changes: 1 addition & 2 deletions src/store/connectionStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineStore } from 'pinia';
import { CustomError } from '../common/customError';
import { pureObject } from '../common/pureObject';
import { CustomError, pureObject } from '../common';

export type Connection = {
id?: number;
Expand Down
1 change: 0 additions & 1 deletion src/utils/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/views/connect/components/connect-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

<script setup lang="ts">
import { Close } from '@vicons/carbon';
import { CustomError } from '../../../common/customError';
import { CustomError } from '../../../common';
import { Connection, useConnectionStore } from '../../../store/connectionStore';
import { useLang } from '../../../lang';
import { FormValidationError } from 'naive-ui';
Expand Down
3 changes: 1 addition & 2 deletions src/views/connect/components/connect-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ import { MoreOutlined } from '@vicons/antd';
import { storeToRefs } from 'pinia';
import { useLang } from '../../../lang';
import { Connection, useConnectionStore } from '../../../store';
import { debug } from '../../../common/debug';
import { CustomError } from 'src/common/customError';
import { debug, CustomError } from '../../../common';
const emits = defineEmits(['edit-connect']);
Expand Down
2 changes: 1 addition & 1 deletion src/views/editor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script setup lang="ts">
import * as monaco from 'monaco-editor';
import { storeToRefs } from 'pinia';
import { searchTokensProvider } from '../../common/searchTokensProvider';
import { searchTokensProvider } from '../../common';
import { useAppStore, useSourceFileStore } from '../../store';
const appStore = useAppStore();
Expand Down

0 comments on commit 1ec547b

Please sign in to comment.