@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.
- package/copy-required-css.js +12 -4
- package/package.json +1 -1
package/copy-required-css.js
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
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()
|