diff --git a/src/command/sync/modules/base.ts b/src/command/sync/modules/base.ts index b33c550..9ebed38 100644 --- a/src/command/sync/modules/base.ts +++ b/src/command/sync/modules/base.ts @@ -18,12 +18,14 @@ const checkAuth = (value: string = '', baseURL: string = '') => { } return false; }; + +const DEFAULT_IGNORE = ['node_modules/**', '.git/**', '.next/**', '.astro/**', '.pack-dist/**']; export class SyncBase { config: Config; #filename: string; #dir: string; baseURL: string; - defaultIgnore: string[] = ['node_modules/**', '.git/**']; + defaultIgnore: string[] = DEFAULT_IGNORE; constructor(opts?: SyncOptions) { const filename = opts?.configFilename || 'kevisual.json'; const dir = opts?.dir || process.cwd(); @@ -71,6 +73,12 @@ export class SyncBase { const realFilename = path.basename(filename); return { relative: path.relative(dir, file), absolute: file, filename: realFilename }; } + /** + * + * @param syncType + * @param type + * @returns + */ async canDone(syncType: SyncConfigType, type?: SyncConfigType) { if (syncType === 'sync') return true; return syncType === type;