Skip to content

Commit

Permalink
feat - fixing copy over (#477)
Browse files Browse the repository at this point in the history
* feat - fixing copy over

* feat - fixing copy over

* Create slow-stingrays-own.md

---------

Co-authored-by: Boyne <[email protected]>
  • Loading branch information
boyney123 and Boyne authored Jan 17, 2024
1 parent 1d7c270 commit e8846cb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changeset/slow-stingrays-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@eventcatalog/create-eventcatalog": patch
"@eventcatalog/core": patch
---

feat - fixing copy over
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ There is currently a limit on what can be changed.
If you want to override some styles of particular elements, raise an issue for discussion. (https://github.com/boyney123/eventcatalog)
Note: Override based on custom selectors / hacks at your own risk. EventCatalog selectors will change over time, which may break your styles.
use the styles marked with `ec-` for non breaking styling changes.
use the styles marked with `ec-` for non breaking styling changes
*/
.ec-homepage{
Expand Down
13 changes: 10 additions & 3 deletions packages/eventcatalog/bin/eventcatalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ cli

// Copy the eventcatalog file over
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));

if (fs.ensureFileSync(path.join(projectDIR, 'eventcatalog.styles.css'))) {
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));
}

// Move the schemas into public directory so we can download them from UI
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run scripts:move-schema-for-download`, {
Expand Down Expand Up @@ -84,7 +87,9 @@ cli
fs.copySync(path.join(projectDIR, 'public'), path.join(eventCatalogLibDir, 'public'));

fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));
if (fs.ensureFileSync(path.join(projectDIR, 'eventcatalog.styles.css'))) {
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));
}

// Move the schemas into public directory so we can download them from UI
execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run scripts:move-schema-for-download`, {
Expand All @@ -109,7 +114,9 @@ cli
}

fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogLibDir, 'eventcatalog.config.js'));
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));
if (fs.ensureFileSync(path.join(projectDIR, 'eventcatalog.styles.css'))) {
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));
}

execSync(`cross-env PROJECT_DIR='${projectDIR}' npm run generate`, {
cwd: eventCatalogLibDir,
Expand Down
2 changes: 1 addition & 1 deletion scripts/start-catalog-locally.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const eventCatalogDir = path.join(__dirname, '../packages/eventcatalog');
const projectDIR = path.join(__dirname, '../examples/basic');

fs.copyFileSync(path.join(projectDIR, 'eventcatalog.config.js'), path.join(eventCatalogDir, 'eventcatalog.config.js'));
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogDir, 'eventcatalog.styles.css'));
fs.copyFileSync(path.join(projectDIR, 'eventcatalog.styles.css'), path.join(eventCatalogLibDir, 'eventcatalog.styles.css'));

execSync(`PROJECT_DIR=${projectDIR} npm run scripts:move-schema-for-download`, {
cwd: eventCatalogDir,
Expand Down

1 comment on commit e8846cb

@vercel
Copy link

@vercel vercel bot commented on e8846cb Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.