mirror of
https://github.com/SamEyeBam/animate.git
synced 2025-09-28 06:55:25 +00:00
23 lines
522 B
JavaScript
23 lines
522 B
JavaScript
// @flow strict-local
|
|
import type {BuildProgressEvent} from '@parcel/types';
|
|
|
|
import path from 'path';
|
|
|
|
export function getProgressMessage(event: BuildProgressEvent): ?string {
|
|
switch (event.phase) {
|
|
case 'transforming':
|
|
return `Building ${path.basename(event.filePath)}...`;
|
|
|
|
case 'bundling':
|
|
return 'Bundling...';
|
|
|
|
case 'packaging':
|
|
return `Packaging ${event.bundle.displayName}...`;
|
|
|
|
case 'optimizing':
|
|
return `Optimizing ${event.bundle.displayName}...`;
|
|
}
|
|
|
|
return null;
|
|
}
|