File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
packages/create/src/utils Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export const JS_CONFIG = {
4040
4141// Supported templates
4242
43+ /**Supported Vanilla Templates */
4344const VANILLA_TEMPLATES = [
4445 "ts" ,
4546 "ts-vitest" ,
@@ -58,6 +59,7 @@ const VANILLA_TEMPLATES = [
5859] as const satisfies string [ ] ;
5960export type VanillaTemplate = ( typeof VANILLA_TEMPLATES ) [ number ] ;
6061
62+ /**Supported Start Templates */
6163const START_TEMPLATES = [
6264 "basic" ,
6365 "bare" ,
@@ -80,12 +82,17 @@ const START_TEMPLATES = [
8082] as const satisfies string [ ] ;
8183export type StartTemplate = ( typeof START_TEMPLATES ) [ number ] ;
8284
85+ /**Supported Library Templates */
8386export const LIBRARY_TEMPLATES = [ "solid-lib-starter" ] as const satisfies string [ ] ;
8487export type LibraryTemplate = ( typeof LIBRARY_TEMPLATES ) [ number ] ;
8588
8689export const PROJECT_TYPES = [ "start" , "vanilla" , "library" ] as const satisfies string [ ] ;
8790export type ProjectType = ( typeof PROJECT_TYPES ) [ number ] ;
8891
92+ /**
93+ * Fetches the template list for the project type given
94+ * @param projectType type of project
95+ */
8996export function getTemplatesList ( projectType : "vanilla" ) : StartTemplate [ ] ;
9097export function getTemplatesList ( projectType : "start" ) : VanillaTemplate [ ] ;
9198export function getTemplatesList ( projectType : "library" ) : VanillaTemplate [ ] ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { join, resolve } from "node:path";
44import { transform } from "sucrase" ;
55import { rm } from "node:fs/promises" ;
66import { JS_CONFIG } from "./constants" ;
7+
78const convertToJS = async ( file : Dirent , startPath : string ) => {
89 const src = join ( startPath , file . name ) ;
910 const dest = resolve ( startPath . replace ( ".project" , "" ) , file . name ) ;
You can’t perform that action at this time.
0 commit comments