32 lines
		
	
	
		
			904 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			904 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
/* -----------------------------------------------
 | 
						|
 * executes as standard  task
 | 
						|
 * ----------------------------------------------- */
 | 
						|
import * as plugins from './mod.plugins.js';
 | 
						|
import * as paths from '../paths.js';
 | 
						|
 | 
						|
import { logger } from '../gitzone.logging.js';
 | 
						|
 | 
						|
export let run = () => {
 | 
						|
  const done = plugins.smartpromise.defer();
 | 
						|
  logger.log('warn', 'no action specified');
 | 
						|
  logger.log(
 | 
						|
    'info',
 | 
						|
    `
 | 
						|
    You can do one of the following things:
 | 
						|
    * create a new project with 'gitzone template [template]'
 | 
						|
      the following templates exist: ${(() => {
 | 
						|
        let projects = `\n`;
 | 
						|
        for (const template of plugins.smartfile.fs.listFoldersSync(
 | 
						|
          paths.templatesDir,
 | 
						|
        )) {
 | 
						|
          projects += `       - ${template}\n`;
 | 
						|
        }
 | 
						|
        return projects;
 | 
						|
      })()}
 | 
						|
    * format a project with 'gitzone format'
 | 
						|
  `,
 | 
						|
  );
 | 
						|
  done.resolve();
 | 
						|
  return done.promise;
 | 
						|
};
 |