Add shadcn, tailwind and react detection & templates to bun create. Also: bun install --analyze <files...> (#17035)

This commit is contained in:
Jarred Sumner
2025-02-09 09:36:57 -08:00
committed by GitHub
parent 14164920b5
commit ba8573494a
62 changed files with 4437 additions and 282 deletions

View File

@@ -190,8 +190,12 @@ pub inline fn containsAny(in: anytype, target: string) bool {
/// a folder name. Therefore, the name can't contain any non-URL-safe
/// characters.
pub fn isNPMPackageName(target: string) bool {
if (target.len == 0) return false;
if (target.len > 214) return false;
return isNPMPackageNameIgnoreLength(target);
}
pub fn isNPMPackageNameIgnoreLength(target: string) bool {
if (target.len == 0) return false;
const scoped = switch (target[0]) {
// Old packages may have capital letters