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

grunt doc fails #86

Open
jonnenauha opened this issue Jan 7, 2016 · 1 comment
Open

grunt doc fails #86

jonnenauha opened this issue Jan 7, 2016 · 1 comment

Comments

@jonnenauha
Copy link
Member

jsdoc recently made a change that runs the application code with js strict mode. I can't imagine what the reasoning for this might be, forcing non strict code to go this way will create breakages.

I have fixed this in Meshmoon web-rocket already. I would imagine cherry picking it here until we base our impl to this repo will be impossible.

But the fix is to put "use strict"; as the first line inside the define() function in the file its complaining about. Then F5 run client.html and go fix the place, chrome dev tools will give you exact like by clicking the error. Note that not all strict mode errors happen during file parsing. So for some things you actually have to execute the function to get the strict mode error to dev tools.

As said I have gone through the codebase to make jsdoc work, for file parsing and execution. @cvetan5 can go though my commits and port the changes manually.

Finally test with grunt doc that it completes without errors.

image 1

@jonnenauha
Copy link
Member Author

Until this is fixed, a temp fix would be to comment out https://github.com/realXtend/WebTundra/blob/master/Gruntfile.js#L754 to make grunt build work again.

I would maybe advice against this as it will then get forgotten :) Also using strict mode in the modules is better. I have started to transition web-rocket to this, but it is a bit hard as a afterthought because its hard to execute all code paths with programmatic testing. Also the fix is not that labor intensive so just same to spend an hour with it :)

jonnenauha pushed a commit that referenced this issue Feb 3, 2016
Generating docs with the build command can be brought back once issue #86 has been resolved.
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

1 participant