Skip to content

Commit

Permalink
Added error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
HammadTheOne committed May 18, 2021
1 parent 5b9f960 commit 0427f28
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ const retrieveAssets = async () => {
shell.cd(assetsPath);
shell.exec(`git clone https://github.com/plotly/${element}`);
shell.cd(path.resolve(assetsPath, element));
shell.exec('npm i && npm run build');
try {
shell.exec('npm i && npm run build');
} catch (err) {
print(`Encountered the following error: ${err.message} \n
Make sure you have dash-generate-components in your Python environment.`);
}
}
};

Expand Down Expand Up @@ -59,7 +64,10 @@ function copyHtmlInstDirectory() {

function copyTableInstDirectory() {
if (fs.existsSync(path.resolve(__dirname, 'gulp-assets/dash-table/inst'))) {
return src(['gulp-assets/dash-table/inst/**/*', '!gulp-assets/dash-table/inst/deps/index.html'])
return src([
'gulp-assets/dash-table/inst/**/*',
'!gulp-assets/dash-table/inst/deps/index.html',
])
.pipe(print())
.pipe(dest('inst/'));
}
Expand Down

0 comments on commit 0427f28

Please sign in to comment.