Skip to content

Commit

Permalink
better log
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugos68 committed May 25, 2024
1 parent 4b3ac29 commit fe3cb74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-taxis-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vite-plugin-pagefind": patch
---

Better logs
5 changes: 3 additions & 2 deletions src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ export default function dev(): PluginOption {

switch (pagefind_config.dev_strategy) {
case 'eager': {
console_log('Building pagefind...');
console_log('Building site...');
execSync(pagefind_config.build_command, {
cwd: vite_config.root
});

console_log(`Copying pagefind bundle to assets dir...`);
await promises.cp(
resolve(pagefind_config.site_dir, 'pagefind'),
Expand All @@ -38,7 +39,7 @@ export default function dev(): PluginOption {
);

if (!pagefind_in_site) {
console_log('Building pagefind...');
console_log('Building site...');
execSync(pagefind_config.build_command, {
cwd: vite_config.root
});
Expand Down

0 comments on commit fe3cb74

Please sign in to comment.