File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ export function generateTemplateHtml(
88
99<form id="mainForm" method="post" action="https://stackblitz.com/run" target="_self">
1010${ Object . entries ( files )
11- . map (
12- ( [ file , contentOrUrl ] ) =>
13- `<input type="hidden" name="project[files][${ escapeFilename ( file ) } ]" value="${ escapeHtml ( formatFileContent ( file , contentOrUrl ) ) } ">` ,
14- )
15- . join ( "\n" ) }
11+ . map (
12+ ( [ file , contentOrUrl ] ) =>
13+ `<input type="hidden" name="project[files][${ escapeFilename ( file ) } ]" value="${ escapeHtml ( formatFileContent ( file , contentOrUrl ) ) } ">` ,
14+ )
15+ . join ( "\n" ) }
1616<input type="hidden" name="project[description]" value="generated by https://pkg.pr.new">
1717<input type="hidden" name="project[template]" value="node">
1818<input type="hidden" name="project[title]" value="${ name } ">
@@ -23,7 +23,7 @@ ${Object.entries(files)
2323}
2424
2525function formatFileContent ( filename : string , content : string ) : string {
26- if ( filename . endsWith ( ' .json' ) ) {
26+ if ( filename . endsWith ( " .json" ) ) {
2727 try {
2828 const parsed = JSON . parse ( content ) ;
2929 return JSON . stringify ( parsed , null , 2 ) ;
Original file line number Diff line number Diff line change @@ -105,10 +105,10 @@ const main = defineCommand({
105105 const paths =
106106 args . _ . length > 0
107107 ? await glob ( args . _ , {
108- expandDirectories : false ,
109- onlyDirectories : true ,
110- absolute : true ,
111- } )
108+ expandDirectories : false ,
109+ onlyDirectories : true ,
110+ absolute : true ,
111+ } )
112112 : [ process . cwd ( ) ] ;
113113
114114 const templates = await glob ( args . template || [ ] , {
You can’t perform that action at this time.
0 commit comments