cli/ts/mod_start/index.ts

27 lines
833 B
TypeScript
Raw Normal View History

2024-06-21 17:48:43 +00:00
import * as plugins from './mod.plugins.js';
import * as paths from '../paths.js';
import { logger } from '../gitzone.logging.js';
/**
* executes basic project setup for continuing to work.
* TODO: switch to smartgit
* @param argvArg
*/
export const run = async (argvArg: any) => {
logger.log('info', `preparing the project at ${paths.cwd} for development`);
const smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash',
});
await smartshellInstance.execStrict(`cd ${paths.cwd} && git checkout master`);
await smartshellInstance.execStrict(`cd ${paths.cwd} && git pull origin master`);
await smartshellInstance.execStrict(`cd ${paths.cwd} && npm ci`);
await provideNoGitFiles();
};
const provideNoGitFiles = async () => {
logger.log('warn', 'nogit provision not yet implemented!');
};