Coder Social home page Coder Social logo

Comments (6)

krzysztofzablocki avatar krzysztofzablocki commented on May 21, 2024

Was about to write about this, you beat me to the punch.
I think a reasonable approach would be to:

  • Add a folder for generic Templates in this repository
  • Add generation tests to always keep Templates up-to date with tool version thus avoiding breaking them with updates
  • Bundle templates with the binary distribution of the Pod, so that people can use our default implementation if they wish

Makes sense?

from sourcery.

krzysztofzablocki avatar krzysztofzablocki commented on May 21, 2024

I updated our readme and introduced some example templates which we might tweak, once we approach 1.0 release we can embeed those that are the most generic, take a look at #123

from sourcery.

bejar37 avatar bejar37 commented on May 21, 2024

I think it would be really interesting to have a project that people can pull in as a dependency (like SwiftGen, via Cocoapods or Carthage) which provides some basic templates for protocols like AutoEquatable or AutoHashable.
Do you think this is feasible? Another future direction for that would be providing a way for each user of that repository to add their own templates that are less widely applicable (maybe JSON parsing, lenses, etc.).

Basically, I think it would be cool for the example templates in #123 to be usable for an end-user. I'm not sure if that belongs in Sourcery itself, or in a project which has Sourcery as a dependency.

from sourcery.

krzysztofzablocki avatar krzysztofzablocki commented on May 21, 2024

@bejar37 that's the idea, I made those files separate so we can bring them in as embedded templates later on, I didn't bundle them yet because we are far from 1.0 and a lot of changes are happening

from sourcery.

bejar37 avatar bejar37 commented on May 21, 2024

Oops, I see that I hadn't read your previous comment throughly @krzysztofzablocki . Sorry!

from sourcery.

krzysztofzablocki avatar krzysztofzablocki commented on May 21, 2024

Actually, lets embeed them in binary distrubtion, people can choose to use them or not :)

from sourcery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.