Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to NPM #102

Open
pacarvalho opened this issue Sep 4, 2019 · 5 comments
Open

Publish to NPM #102

pacarvalho opened this issue Sep 4, 2019 · 5 comments

Comments

@pacarvalho
Copy link

Duplicate of #43

Can you please publish this package to NPM?

  1. Many client side applications have pipelines that are not designed to have ENVs in the HTML.
  2. It makes for better code for the developers using your product to be able to yarn add your module and have a class instantiated that we can access.

Currently we rely on packages maintained by third parties for this purpose which increases the chances of having lagged versions.

You could even create a package that fetches the source code within it to solve the problem of breaking changes on your package stopping client applications from functioning.

@david-sharer
Copy link

david-sharer commented Dec 1, 2020

Workaround for those willing to welcome cthulhu into their code base:

function evaluateAndExport<T>(code: string, exportedValue: string): T {
  return Function(`${code};\n\n;return ${exportedValue};`)();
}
// this gets the file in angular2+, adapt as needed
const fileText = await this.http.get('https://...../2.0/zaf_sdk.js', { responseType: 'text' }).toPromise();
const exportedValue = evaluateAndExport<ExportedZafClient>(fileText, 'ZAFClient');
const client = exportedValue.init();

@tyteen4a03
Copy link

Bump - we would like to be able to type hint in our code.

@kyleyee23
Copy link

+1

@devinmatte
Copy link

Any update on an NPM publish? There's https://www.npmjs.com/package/zendesk_app_framework_sdk which is a publishing an old version from a fork

@bkw
Copy link

bkw commented Mar 6, 2024

2024 and still nobody cares. How sad.

@bkw bkw mentioned this issue Dec 5, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants