Skip to content

Commit

Permalink
fix(core): fixed outdir to output to users directory now (#915)
Browse files Browse the repository at this point in the history
* fix(core): fixed outdir to output to users directory now

* Create large-rings-enjoy.md

* fix(core): fixed outdir to output to users directory now

* fix(core): fixed outdir to output to users directory now
  • Loading branch information
boyney123 authored Oct 27, 2024
1 parent b29d4f9 commit 61e5cf1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-rings-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/core": patch
---

fix(core): fixed outdir to output to users directory now
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import { join } from 'node:path';
import config from './eventcatalog.config';
import expressiveCode from 'astro-expressive-code';

const coreDirectory = process.env.CATALOG_DIR || process.cwd();
const projectDirectory = process.env.PROJECT_DIR || process.cwd();
const base = config.base || '/';

// https://astro.build/config
export default defineConfig({
base,
server: { port: config.port || 3000 },

outDir: config.outDir ? join(coreDirectory, config.outDir) : join(coreDirectory, 'dist'),
outDir: config.outDir ? join(projectDirectory, config.outDir) : join(projectDirectory, 'dist'),

// https://docs.astro.build/en/reference/configuration-reference/#site
site: config.homepageLink || 'https://eventcatalog.dev/',
Expand Down
6 changes: 0 additions & 6 deletions bin/eventcatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ program
cwd: core,
stdio: 'inherit',
});

// // everything is built make sure its back in the users project directory
copyFolder(join(core, 'dist'), join(dir, 'dist'));
});

const previewCatalog = () => {
Expand All @@ -104,9 +101,6 @@ const previewCatalog = () => {
cwd: core,
stdio: 'inherit',
});

// // everything is built make sure its back in the users project directory
copyFolder(join(core, 'dist'), join(dir, 'dist'));
};

program
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default defineConfig({
trace: 'on-first-retry',
},
webServer: {
command: 'npm run preview',
command: 'npm run preview -- --root examples/default --port 3000',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
Expand Down

0 comments on commit 61e5cf1

Please sign in to comment.