@@ -3,7 +3,7 @@ import type { CAC } from "cac";
33import fs from "fs/promises" ;
44import path from "path" ;
55import pc from "picocolors" ;
6- import { banner } from "../utils/common" ;
6+ import { banner , PATH_ALIASES } from "../utils/common" ;
77
88declare const Bun : typeof import ( "bun" ) ;
99
@@ -255,11 +255,19 @@ export function registerBuildCommand(cli: CAC) {
255255 const genDir = path . join ( botRoot , ".djscore" ) ;
256256 const entryPath = path . join ( genDir , "index.ts" ) ;
257257
258- const commandsDir = path . join ( botRoot , "interactions" , "commands" ) ;
259- const buttonsDir = path . join ( botRoot , "interactions" , "buttons" ) ;
260- const contextsDir = path . join ( botRoot , "interactions" , "contexts" ) ;
261- const selectsDir = path . join ( botRoot , "interactions" , "selects" ) ;
262- const eventsDir = path . join ( botRoot , "interactions" , "events" ) ;
258+ const commandsDir = path . join (
259+ botRoot ,
260+ PATH_ALIASES . interactions ,
261+ "commands" ,
262+ ) ;
263+ const buttonsDir = path . join ( botRoot , PATH_ALIASES . components , "buttons" ) ;
264+ const contextsDir = path . join (
265+ botRoot ,
266+ PATH_ALIASES . interactions ,
267+ "contexts" ,
268+ ) ;
269+ const selectsDir = path . join ( botRoot , PATH_ALIASES . components , "selects" ) ;
270+ const eventsDir = path . join ( botRoot , PATH_ALIASES . events ) ;
263271
264272 console . log ( `${ pc . cyan ( "ℹ" ) } Project: ${ pc . bold ( botRoot ) } ` ) ;
265273 console . log ( `${ pc . cyan ( "ℹ" ) } Generating: ${ pc . bold ( entryPath ) } \n` ) ;
@@ -358,9 +366,16 @@ export function registerBuildCommand(cli: CAC) {
358366 const sizeDisplay =
359367 stats . size > 1024 * 1024 ? `${ sizeMB } MB` : `${ sizeKB } KB` ;
360368
369+ const totalSourceFiles =
370+ commandFiles . length +
371+ buttonFiles . length +
372+ contextFiles . length +
373+ selectFiles . length +
374+ eventFiles . length ;
375+
361376 console . log (
362377 pc . green ( "✓" ) +
363- ` Build success (${ outputs . length } file ${ outputs . length === 1 ? "" : "s" } , ${ sizeDisplay } )` ,
378+ ` Build success (${ totalSourceFiles } file ${ totalSourceFiles === 1 ? "" : "s" } → ${ outputs . length } output ${ outputs . length === 1 ? "" : "s" } , ${ sizeDisplay } )` ,
364379 ) ;
365380 for ( const p of outputs ) console . log ( pc . dim ( ` - ${ p } ` ) ) ;
366381
0 commit comments