-
Notifications
You must be signed in to change notification settings - Fork 101
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
Support CSON. #43
Comments
I started on this, but I think I decided it’s beyond my abilities since it wouldn’t just be a preprocesor. It would have to support |
I would hold off on CSON. I think HJSON suits our needs much better. |
@kennethormandy I got all the valid CSON tests passing in my branch. It doesn't support harp.cson yet, but wouldn't you simply be able to edit harp to use terraform to parse it's own config file? Hopefully this helps! |
@sintaxi CSON is currently switching their parser (coffescript) for a static one (cson-safe). Is there any reason to not finish the CSON one and then add HJSON as a 'data' parser too? |
Woah, looks promising! Failing tests 1–3 are because I thought CSON would need to error like the other preprocessors: by showing something in the browser. (This stuff happens in I supposed you could argue that it should follow what JSON does right now and just fail and throw an error outright. In that case, those tests would need to be different. Otherwise, CSON would kind of need to be implemented in two places: once as a preprocessor and once for the The last failing test looks related to that. Because you can go I’m glad you’re working on this, we seem to have a pretty solid group of people who want whitespace significant everything. I’m definitely onboard, and personally I think adding comments or not breaking when JSON doesn’t have comments doesn’t conflict with adding CSON. |
@kennethormandy OK, I'll probably be able to take another stab at this sometime later this weekend. Feel free to run with some of the work I did if you want to poke around some more. I've got CSON in 2 places right now, where it's used for _data.json I'm just running it through the regular CSON parser, instead of the Re: |
@drbrts https://github.com/atom/season I think, this should be simple enough to read a file, then export it as |
What's the state of this. I have a course catalog organized as an _data directory that currently I build into _data.json so that Harp serves it properly. Harp handles the .coffeescript and I wonder if building directly into a single .coffee would be better since it gets served up as a single .js file. The goal for me is to just save edits to the individual .cson files and have them be compiled, cached, etc automatically (without any db saves of course). |
+1, since CSON is essentially CoffeeScript, it shouldn't be an issue? Or? |
HJSON sounds like a great idea! I'll give it a try this weekend, I think. |
Support for a CSON files seems to be right up the ally here. And with atom, and github pushing coffeescript and CSON I think we'll be seeing more and more of it.
Cheers.
The text was updated successfully, but these errors were encountered: