tokenDirFor static method

String tokenDirFor(
  1. ProjectContext ctx
)

Token / component import folder for an existing project.

Implementation

static String tokenDirFor(ProjectContext ctx) {
  if (ctx.usesDesignSystem) return designDirFor(ctx.architecture);
  try {
    return DesignPaths.legacyTokenDirFromId(ctx.architecture);
  } on FormatException {
    throw ArgumentError(
      'Unknown architecture "${ctx.architecture}". '
      'Expected one of: clean, mvvm, feature-first, simple.',
    );
  }
}