Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

fixed client js not initializing, concat order #42 #43

Merged
merged 1 commit into from
May 12, 2017
Merged

fixed client js not initializing, concat order #42 #43

merged 1 commit into from
May 12, 2017

Conversation

gdelmas
Copy link
Contributor

@gdelmas gdelmas commented Apr 21, 2017

No description provided.

'src/default/assets/js/src/typedoc/Application.ts',
'src/default/assets/js/src/typedoc/components/**/*.ts',
'src/default/assets/js/src/typedoc/services/**/*.ts',
'src/default/assets/js/src/typedoc/utils/**/*.ts',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this simpler and into a single glob of types/**/*.ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was a single glob before. that is why it was not working. when using globbing the concatenation order can not be specified. but the code relies on some order.

one way to specify the order might be to use /// reference comments in the .ts files. i don't know the exact order the files might need to be loaded. from debugging i just saw that components and services need to be executed before the application is initialized. so an alternative globbing might be src/default/assets/js/src/lib/**/*.ts, src/default/assets/js/src/typedoc/**/*.ts, src/default/assets/js/src/~bootstrap.ts.

i was also wondering what the following option does.

basePath: 'themes',

i could not find any documentation about it.

all client js is currently not working without changing concat order on my system. does it work on yours?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all client js is currently not working without changing concat order on my system. does it work on yours?

I haven't tested it, sorry. I'm just helping maintain the issues and PRs.

so an alternative globbing might be

Sorry, yes, this is what I was suggesting. I wasn't suggesting the same thing it was before. I guess I hoped the location of my comment made it clearer, but I suppose not 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i forgot. i had thought about it before. the issue is that Application.ts has to be concated before components and services, because the register functions called by the latter ones are defined there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks. Sounds like a mess. Is there enough references in there to make this all work? I thought that controlled the output order, but I might have been wrong. What about if we add that you need at the beginning plus the glob? I'm sure it would be de-duped, but it's been a long time since I used Grunt often.

@gdelmas
Copy link
Contributor Author

gdelmas commented Apr 21, 2017

there are currently no /// reference comments in the files. i also think they do not control the concat order when globs are used. this is not a grunt issue, but a misconfiguration of the typescript compiler.

i see four options. either,
a) a developer fixes the code and adds references to the .ts files
b) the concat order is defined in the gruntfile with some globs
c) the concat order is defined in the gruntfile without globs
d) you remove all the runtime js, or leave it broken.

i can provide option b) and c).

@blakeembrey
Copy link
Member

I'm good with b, I'm just trying to make sure it's as simple as it can be. Have you tried providing the module names explicitly at the beginning with the glob after it?

@gdelmas
Copy link
Contributor Author

gdelmas commented Apr 21, 2017

than the order will not be as self explanatory, because of de-duplication etc.

please also see: https://github.com/TypeStrong/typedoc/blob/master/gruntfile.js#L14

@gdelmas
Copy link
Contributor Author

gdelmas commented Apr 21, 2017

please also feel free to modify the PR to your likening.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants