App building with Webpack for marketplace

Hello, I am trying to make Freshdesk App for publishing in the marketplace,my application uses a modular assembly,npm packages and utilities such as Webpack ,eslintbabel , quite a bit of code is written in my application
This is a main.js file

 

import $ from 'jquery'
$(document).ready(() => {
  window.app.initialized().then((_client) => { // Client Object is obtained
    const client = _client
    console.log('App Initialize', client)
  })
})

 The problem is that when I run my application in dev mode,I get quite low coverage summary
For example
I have this coverage summary, when my code is compiled by webpack in development mode

image


And this coverage summary when my code is minified

image


As I understand it, this is due to the npm packages I use
Q. Can I use npm packages for publishing an application in the marketplace?
Q. How to avoid low scores 
coverage summary?
Q. If I will not use npm packages but I will need to connect a third-party library that also contains code with webpack, it will also lower the coverage rates?



Sorry, I created a lot of topics, you have technical problems and I didn’t have a forum thread, but it turned out that they were created

ADMIN

Hi Vlad API,


Q. Can I use npm packages for publishing an application in the marketplace?
A. NPM pacakges can be used for serverless apps. Please see this reference: https://developers.freshdesk.com/v2/docs/external-libraries/#npm_packages

Q. How to avoid low scores coverage summary?
A.  Please see this page that talks more than just coverage summary: https://developers.freshdesk.com/v2/docs/code-review-guidelines/

Q. If I will not use npm packages but I will need to connect a third-party library that also contains code with webpack, it will also lower the coverage rates?
A. FDK will check for code coverage  for only the files which are in the project directory. (and not the scripts hosted remotely)


Hope that helps!


Login or Signup to post a comment

Sign up for Freshsales today

Start your 21-day free trial. No credit card required. No strings attached.

Start Free Trial