Skip to content

Commit

Permalink
resolve the code rabbit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
panwaranuj01 committed Nov 24, 2024
1 parent 6d0888a commit 5e7e64e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"postpublish": "pinst --enable",
"prettier": "prettier --ignore-path './.prettierignore' --write './**/*.js'",
"prettify-commit": "pretty-quick --staged --pattern '**/*.js'",
"build-dev:scss-to-css": "sass --watch ./webplugin/scss:./webplugin/css/app/style && npm run sentry:sourcemaps",
"build-dev:scss-to-css": "sass --watch ./webplugin/scss:./webplugin/css/app/style",
"build:dev": "nodemon ./server/app.js",
"dev": "npm-run-all -p build:dev build-dev:scss-to-css setup-git-hooks",
"build-test": "export NODE_ENV=test && npm-run-all build-server gulp-build",
Expand Down
12 changes: 8 additions & 4 deletions webplugin/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,18 @@ async function uploadSourceMaps(done) {
done();
} catch (error) {
console.error('Failed to upload source maps:', error);
done(error);
}
}
// Task to upload source maps to Sentry
gulp.task('upload-sourcemaps', function (done) {
return new Promise(async (resolve, reject) => {
gulp.task('upload-sourcemaps', async function (done) {
try {
await uploadSourceMaps(done);
resolve();
});
done();
} catch (error) {
console.error('Failed to upload source maps:', error);
done(error);
}
});

gulp.task('cleanFolder', function () {
Expand Down
5 changes: 3 additions & 2 deletions webplugin/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,11 @@ function scriptLoader(options) {
console.error('Error while loading file.', options.url);
reject('ERROR_TO_LOAD_FILE');
// throw new Error('Error while loading file.', url);
} else {
resolve();
}
resolve();
};
options._document.head.append(script);
options._document.head.appendChild(script);
});
}

Expand Down

0 comments on commit 5e7e64e

Please sign in to comment.