Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat - fixing copy over #477

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading