sketch-hq / coma Goto Github PK
View Code? Open in Web Editor NEWA code generator. Takes JSON templates describing a model, and turns them into Objective-C classes.
A code generator. Takes JSON templates describing a model, and turns them into Objective-C classes.
Implement the ability to read in default meta definitions from another json file.
Implement the ability to read in default variable definitions from another json file.
Add a way to specify other folder locations to use when looking for templates.
Currently included sub-templates are having to use relative paths, which is fine but gets a bit messy. It would be much better if we could specify one or more search paths to use.
Need to check how easy it is to support this in GRMustache, since it is currently doing the finding of the included files for us.
When a file isn't modified, Coma currently outputs a message about it.
Add an option to turn this off, so it only outputs information about files that were regenerated.
The output of this information should be off by default, as it's not a lot of use, and it's nicer to be able to see a list of just the files that changed.
If access is set on a property, add it to the header definition
Example: access = "readonly"
When we generate a new copy of a file, we should check to see if it's identical to the old copy, and not bother overwriting the old one unless something has changed.
This will prevent Xcode from trying to recompile stuff that hasn't changed.
We can use them to represent some options that control the generated code output.
For object properties, it's probably hard to supply a default value, but it is easy to generate code to initialise them to a new instance of whatever object type they take.
E.g, to generate:
_pathStyle = [[MSPathDecorationStyle alloc] init];
We'll need the ability to disable this for properties where custom code is going to do something smarted.
Actually, the best way to do it may be to specify the selector of an init method to call. No selector means do nothing, or you can supply init (which produces the code above), or you could supply your own selector like "initWithMyCustomSettings" which would produce
_pathStyle = [[MSPathDecorationStyle alloc] initWithMyCustomSettings];
(if necessary you can then add a initWithMyCustomSettings method to the class in a category)
NB in the xcode model editor, marking a property as non-optional might be a quick way to indicate that we want to do this (custom init methods can be specified in the userInfo dictionary).
One for the far future - just wondering how easy it would be to go in this direction as well as the other one...
If private = YES is set on the property, declare it in the .m file.
Need to sort these arrays when generating code, to ensure that the generated output is always the same.
Currently something about the order is different - either when the json is generated or when we enumerate it - on 10.7 and 10.8/9. This means that git thinks that the generated code has changed, when it hasn't.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.