@eventcatalog/core 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 4410826: feat(core): adding preview and start commands to eventcatalog
8
+
3
9
  ## 2.0.4
4
10
 
5
11
  ### Patch Changes
@@ -3136,4 +3136,23 @@ program2.command("build").description("Run build of EventCatalog").action((optio
3136
3136
  });
3137
3137
  copyFolder((0, import_node_path.join)(core, "dist"), (0, import_node_path.join)(dir, "dist"));
3138
3138
  });
3139
+ var previewCatalog = () => {
3140
+ copyCore();
3141
+ copyFolder((0, import_node_path.join)(dir, "public"), (0, import_node_path.join)(core, "public"));
3142
+ copyFile((0, import_node_path.join)(dir, "eventcatalog.config.js"), (0, import_node_path.join)(core, "eventcatalog.config.js"));
3143
+ copyFile((0, import_node_path.join)(dir, "eventcatalog.styles.css"), (0, import_node_path.join)(core, "eventcatalog.styles.css"));
3144
+ (0, import_node_child_process.execSync)(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview`, {
3145
+ cwd: core,
3146
+ stdio: "inherit"
3147
+ });
3148
+ copyFolder((0, import_node_path.join)(core, "dist"), (0, import_node_path.join)(dir, "dist"));
3149
+ };
3150
+ program2.command("preview").description("Serves the contents of your eventcatalog build directory").action((options) => {
3151
+ console.log("Starting preview of your build...");
3152
+ previewCatalog();
3153
+ });
3154
+ program2.command("start").description("Serves the contents of your eventcatalog build directory").action((options) => {
3155
+ console.log("Starting preview of your build...");
3156
+ previewCatalog();
3157
+ });
3139
3158
  program2.parse();
@@ -3138,4 +3138,23 @@ program2.command("build").description("Run build of EventCatalog").action((optio
3138
3138
  });
3139
3139
  copyFolder(join(core, "dist"), join(dir, "dist"));
3140
3140
  });
3141
+ var previewCatalog = () => {
3142
+ copyCore();
3143
+ copyFolder(join(dir, "public"), join(core, "public"));
3144
+ copyFile(join(dir, "eventcatalog.config.js"), join(core, "eventcatalog.config.js"));
3145
+ copyFile(join(dir, "eventcatalog.styles.css"), join(core, "eventcatalog.styles.css"));
3146
+ execSync(`PROJECT_DIR='${dir}' CATALOG_DIR='${core}' npm run preview`, {
3147
+ cwd: core,
3148
+ stdio: "inherit"
3149
+ });
3150
+ copyFolder(join(core, "dist"), join(dir, "dist"));
3151
+ };
3152
+ program2.command("preview").description("Serves the contents of your eventcatalog build directory").action((options) => {
3153
+ console.log("Starting preview of your build...");
3154
+ previewCatalog();
3155
+ });
3156
+ program2.command("start").description("Serves the contents of your eventcatalog build directory").action((options) => {
3157
+ console.log("Starting preview of your build...");
3158
+ previewCatalog();
3159
+ });
3141
3160
  program2.parse();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.0.4",
4
+ "version": "2.0.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },