@driveflux/beam 2.0.7 → 2.0.8

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.
@@ -1,8 +1,16 @@
1
- import { cp, mkdir } from "node:fs/promises"
1
+ import { cp, mkdir, stat } from "node:fs/promises"
2
2
 
3
3
  const copy = async () => {
4
- await mkdir("./src/datepicker", { recursive: true });
5
- await cp("./node_modules/react-calendar/dist/Calendar.css", "./src/datepicker/root-calendar.css");
6
- };
4
+ try {
5
+ // Check if the file exists
6
+ await stat('./node_modules/react-calendar/dist/Calendar.css')
7
+ // Create the directory if it doesn't exist
8
+ await mkdir("./src/datepicker", { recursive: true });
9
+ // Copy the file to the destination
10
+ await cp("./node_modules/react-calendar/dist/Calendar.css", "./src/datepicker/root-calendar.css");
11
+ } catch(e) {
12
+ console.log('Ignored copying the calendar CSS as the node_modules folder is not present')
13
+ }
14
+ }
7
15
 
8
16
  copy()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/beam",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./accordion": {