@data-visuals/create 7.6.4 → 7.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-visuals/create",
3
- "version": "7.6.4",
3
+ "version": "7.6.5",
4
4
  "description": "Create graphics and features the Data Visuals way.",
5
5
  "scripts": {
6
6
  "build:docs": "doctoc README.md --github",
@@ -118,13 +118,18 @@ const organizeFiles = async file => {
118
118
 
119
119
  // main function
120
120
  module.exports = async () => {
121
- // check if a zip file exists in the workspace directory
122
- fs.readdir('workspace/figma2html-exports', (err, files) => {
123
- files.forEach(file => {
121
+ let figma2htmlExports;
122
+ try {
123
+ // check if a figma2html-exports directory exists in the workspace directory
124
+ // if so, extract zip files and move files
125
+ figma2htmlExports = fs.readdirSync('workspace/figma2html-exports');
126
+ figma2htmlExports.forEach(file => {
124
127
  if (file.includes('.zip')) {
125
128
  organizeFiles(file);
126
129
  }
127
- });
128
- });
130
+ })
131
+ } catch (err) {
132
+ return null;
133
+ }
129
134
  };
130
135