feat(CI): Add Continuous Integration workflows for Gitea with Docker-based setup
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tswatch',
|
||||
version: '2.0.39',
|
||||
version: '2.1.0',
|
||||
description: 'A development tool for automatically watching and re-compiling TypeScript projects upon detecting file changes, enhancing developer workflows.'
|
||||
}
|
||||
|
@ -1,7 +1 @@
|
||||
export type TWatchModes =
|
||||
| 'test'
|
||||
| 'node'
|
||||
| 'service'
|
||||
| 'element'
|
||||
| 'website'
|
||||
| 'echo';
|
||||
export type TWatchModes = 'test' | 'node' | 'service' | 'element' | 'website' | 'echo';
|
||||
|
@ -31,7 +31,7 @@ export class TsWatch {
|
||||
filePathToWatch: paths.cwd,
|
||||
commandToExecute: 'npm run test2',
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
break;
|
||||
case 'node':
|
||||
@ -40,7 +40,7 @@ export class TsWatch {
|
||||
filePathToWatch: paths.cwd,
|
||||
commandToExecute: 'npm run test',
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
break;
|
||||
case 'element':
|
||||
@ -51,7 +51,7 @@ export class TsWatch {
|
||||
// lets create a standard server
|
||||
logger.log(
|
||||
'info',
|
||||
'bundling TypeScript files to "dist_watch" Note: This is for development only!'
|
||||
'bundling TypeScript files to "dist_watch" Note: This is for development only!',
|
||||
);
|
||||
this.typedserver = new plugins.typedserver.TypedServer({
|
||||
cors: true,
|
||||
@ -75,13 +75,13 @@ export class TsWatch {
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
// lets get the other ts folders
|
||||
let tsfolders = await plugins.smartfile.fs.listFolders(paths.cwd);
|
||||
tsfolders = tsfolders.filter(
|
||||
(itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web'
|
||||
(itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web',
|
||||
);
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash',
|
||||
@ -97,7 +97,7 @@ export class TsWatch {
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ export class TsWatch {
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
})();
|
||||
break;
|
||||
@ -127,7 +127,7 @@ export class TsWatch {
|
||||
};
|
||||
let tsfolders = await plugins.smartfile.fs.listFolders(paths.cwd);
|
||||
tsfolders = tsfolders.filter(
|
||||
(itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web'
|
||||
(itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web',
|
||||
);
|
||||
for (const tsfolder of tsfolders) {
|
||||
this.watcherMap.add(
|
||||
@ -138,7 +138,7 @@ export class TsWatch {
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
this.watcherMap.add(
|
||||
@ -148,7 +148,7 @@ export class TsWatch {
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
this.watcherMap.add(
|
||||
new Watcher({
|
||||
@ -162,7 +162,17 @@ export class TsWatch {
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
this.watcherMap.add(
|
||||
new Watcher({
|
||||
filePathToWatch: plugins.path.join(paths.cwd, './assets/'),
|
||||
functionToCall: async () => {
|
||||
await assetsHandler.processAssets();
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
}),
|
||||
);
|
||||
})();
|
||||
break;
|
||||
@ -172,7 +182,7 @@ export class TsWatch {
|
||||
filePathToWatch: plugins.path.join(paths.cwd, './ts/'),
|
||||
commandToExecute: 'npm run startTs',
|
||||
timeout: null,
|
||||
})
|
||||
}),
|
||||
);
|
||||
break;
|
||||
case 'echo':
|
||||
|
@ -56,7 +56,7 @@ export class Watcher {
|
||||
logger.log('ok', `executing ${this.options.commandToExecute} for the first time`);
|
||||
}
|
||||
this.currentExecution = await this.smartshellInstance.execStreaming(
|
||||
this.options.commandToExecute
|
||||
this.options.commandToExecute,
|
||||
);
|
||||
} else {
|
||||
console.log('no executionCommand set');
|
||||
@ -64,7 +64,7 @@ export class Watcher {
|
||||
if (this.options.functionToCall) {
|
||||
this.options.functionToCall();
|
||||
} else {
|
||||
console.log('no functionToCall set.')
|
||||
console.log('no functionToCall set.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,9 @@ import { TsWatch } from './tswatch.classes.tswatch.js';
|
||||
const tswatchCli = new plugins.smartcli.Smartcli();
|
||||
|
||||
// standard behaviour will assume gitzone setup
|
||||
tswatchCli.standardCommand().subscribe((argvArg => {
|
||||
tswatchCli.standardCommand().subscribe((argvArg) => {
|
||||
tswatchCli.triggerCommand('npm', {});
|
||||
}))
|
||||
});
|
||||
|
||||
tswatchCli.addCommand('element').subscribe(async (argvArg) => {
|
||||
logger.log('info', `running watch task for a gitzone element project`);
|
||||
|
@ -4,16 +4,12 @@ export { path };
|
||||
|
||||
// @gitzone scope
|
||||
import * as tsbundle from '@git.zone/tsbundle';
|
||||
export {
|
||||
tsbundle
|
||||
}
|
||||
export { tsbundle };
|
||||
|
||||
// @apiglobal scope
|
||||
import * as typedserver from '@api.global/typedserver';
|
||||
|
||||
export {
|
||||
typedserver,
|
||||
}
|
||||
export { typedserver };
|
||||
|
||||
// @pushrocks scope
|
||||
import * as lik from '@push.rocks/lik';
|
||||
|
Reference in New Issue
Block a user