File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const svelteInputPaths = process.argv
1616 . map ( d => d . replace ( "--svelte-in-paths=" , "" ) )
1717 . join ( ":" )
1818 . split ( ":" )
19+ . filter ( d => d != "" )
1920
2021// if no svelte paths, bail out early
2122if ( svelteInputPaths == undefined || svelteInputPaths . length == 0 ) {
@@ -35,7 +36,6 @@ if (quartoRenderPath == undefined || quartoRenderPath.length != 1) {
3536quartoRenderPath = quartoRenderPath [ 0 ]
3637
3738/* export an array of rollup configs: one for each input svelte file */
38-
3939export default svelteInputPaths . map (
4040
4141 svelteFile => ( {
Original file line number Diff line number Diff line change @@ -101,19 +101,10 @@ for input_path in input_paths:gmatch("[^\n]+") do
101101
102102 -- add each unique path, resolving relative project location
103103 for _ , svelte_path in ipairs (sverto_use ) do
104-
105104 local offset_path = offset_svelte_path (
106105 pandoc .utils .stringify (svelte_path ),
107106 input_path )
108-
109- if type (svelte_path ) ~= " string" then
110- print (
111- " Error: sverto.use entry should be a string, not a " ..
112- type (svelte_path ))
113- end
114-
115107 svelte_paths [offset_path ] = offset_path
116-
117108 end
118109
119110 end
@@ -142,6 +133,7 @@ cmd =
142133 get_cmd_prefix () ..
143134 " npm run build " ..
144135 rollup_config .. " -- " ..
136+ -- "--silent " ..
145137 ' --quarto-out-path="' .. os.getenv (" QUARTO_PROJECT_OUTPUT_DIR" ) .. ' " ' ..
146138 ' --svelte-in-paths="' .. svelte_path_string .. ' "'
147139
@@ -150,8 +142,8 @@ print(cmd)
150142
151143local svelteResult = os.execute (cmd )
152144
153- if svelteResult == nil then
154- print (" Svelte compiler finished!" )
145+ if svelteResult == nil or svelteResult == true then
146+ print (" Sverto pre-render finished!" )
155147else
156- print (" Svelte compiler finished with code " .. svelteResult )
148+ print (" Svelte compiler finished with code " .. tostring ( svelteResult ) )
157149end
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ function inject_svelte_and_compile(m)
9898 else
9999 local svelteCommand =
100100 " npm run build rollup.config.js -- " ..
101+ -- "--silent " ..
101102 ' --quarto-out-path="./" ' ..
102103 ' --svelte-in-paths="' .. sveltePaths .. ' "'
103104 local svelteResult = os.execute (svelteCommand )
You can’t perform that action at this time.
0 commit comments