update
This commit is contained in:
@@ -18,12 +18,14 @@ const checkAuth = (value: string = '', baseURL: string = '') => {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const DEFAULT_IGNORE = ['node_modules/**', '.git/**', '.next/**', '.astro/**', '.pack-dist/**'];
|
||||||
export class SyncBase {
|
export class SyncBase {
|
||||||
config: Config;
|
config: Config;
|
||||||
#filename: string;
|
#filename: string;
|
||||||
#dir: string;
|
#dir: string;
|
||||||
baseURL: string;
|
baseURL: string;
|
||||||
defaultIgnore: string[] = ['node_modules/**', '.git/**'];
|
defaultIgnore: string[] = DEFAULT_IGNORE;
|
||||||
constructor(opts?: SyncOptions) {
|
constructor(opts?: SyncOptions) {
|
||||||
const filename = opts?.configFilename || 'kevisual.json';
|
const filename = opts?.configFilename || 'kevisual.json';
|
||||||
const dir = opts?.dir || process.cwd();
|
const dir = opts?.dir || process.cwd();
|
||||||
@@ -71,6 +73,12 @@ export class SyncBase {
|
|||||||
const realFilename = path.basename(filename);
|
const realFilename = path.basename(filename);
|
||||||
return { relative: path.relative(dir, file), absolute: file, filename: realFilename };
|
return { relative: path.relative(dir, file), absolute: file, filename: realFilename };
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param syncType
|
||||||
|
* @param type
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
async canDone(syncType: SyncConfigType, type?: SyncConfigType) {
|
async canDone(syncType: SyncConfigType, type?: SyncConfigType) {
|
||||||
if (syncType === 'sync') return true;
|
if (syncType === 'sync') return true;
|
||||||
return syncType === type;
|
return syncType === type;
|
||||||
|
|||||||
Reference in New Issue
Block a user