-
Notifications
You must be signed in to change notification settings - Fork 6
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
The basic typescript example in documentation doesn't seem to work #111
Comments
Thanks for reporting! |
Having had a quick look at the documentation, the issue seems to be that the documentation doesn't tell you explicitly to run the generator first. Running the |
No components are generated when I run this script:
|
That's a typescript thing that is missing from your package.json: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package |
Ok I got a step further. Now I get the
|
This is because another field that is missing in the The generator generates Components.js definitions for all classes that your npm package exposes. Your package exposes everything that is defined in the So you would have to add that entry pointing to the javascript file that exports your class. |
I've added the main in package.json:
And updated the
Now I get the same error as in #102
|
Thanks for the issue @phochste! Since you've configured Invoking the generator as follows should resolve the problem: (I will update the docs with all of the nuances mentioned in this issues) |
Thanks, I had to make one extra change to get it working. I overlooked
which would be my This worked:
|
I recommend using something like |
Issue type:
Description:
I tried to run the basic typescript example from the documentation page. But it fails to load a remote context. I assume the example given is a mock application? Can a simple 'hello world' example be provided?
config.jsonld
:MyClass.ts
:index.ts
:package.json
:Environment:
Crash log:
The text was updated successfully, but these errors were encountered: