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

Fix for JS Syntax Errors #2

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

marlon-tucker
Copy link

Hello,

The T4 template used to append commas (',') in the two foreach loops regardless if the current element was the last element in the sequence. This is invalid syntax for JSON style objects. I switched the foreach loops to
for loops and put a condition before writing the commas out.

It does seem most browsers are clever enough to ignore this sort of syntax error, but I have the JavaScript Parser VS plugin to aid web dev, and it wasn't happy with the generated inteliisense files.

I also made the template generate better formatted js, but unfortunately
this has caused the T4 template to be harder to read - it seems white
space before conditional T4 blocks is included in the output
unfortunately

stevegreatrex and others added 30 commits November 7, 2012 18:59
So now the transforms are executed after each build
because I caused null references with the last one!
Also fixed code coverage issue
Added a build script to create the nuget package for the main ProxyApi
project
Added a nuspec file for intellisense package
stevegreatrex and others added 5 commits May 4, 2013 09:48
The T4 template used to append commas (',') in the two foreach loops.
This is invalid syntax for JSON objects. I switched the foreach loops to
for loops and put a condition before writing the commas out.

I also made the template generate better formatted js, but unfortunately
this has caused the T4 template to be harder to read - it seems white
space before conditional T4 blocks is included in the output
unfortunately
@stevegreatrex
Copy link
Owner

Hi @marlon-tucker,

I agree with the removal of commas (I'll try to get that merged in) but personally I think I would prefer readability in the code I am working on rather than in the generated code.

@marlon-tucker
Copy link
Author

yep that's fair enough, cheers for the reply.

I am having issues with the MVC project I'm using having multiple 'areas' within it, are you aware of any issues with areas or should I submit a bug ticket?

The namespaces aren't resolving correctly to the correct URLs.

@stevegreatrex
Copy link
Owner

I haven't tested it with multiple areas so create an issue and .I'll look at it when I get a chance.

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

Successfully merging this pull request may close these issues.

2 participants