Code Monkey home page Code Monkey logo

Comments (4)

gregveres avatar gregveres commented on June 20, 2024

@amdavie I am not going to try to answer for @NeVeSpl, but I will say that there are very valid use cases for generating the TS files and not having them inserted into the project.

My project generates approximately 700 TS files (enums, interfaces and service entry points). I used to use Typewriter for this, which always inserts the files into the project and it would take forever, introducing 10-20 second lockups.
When I migrated to NTypewriter, I changed things up so that these files get generated into the stand alone front end directory and not into a project directory. With this setup, NTypewriter is sub 1 second and everything works great.

I just wanted to point out that there are valid reasons for not adding the files to a project.

from ntypewriter.

NeVeSpl avatar NeVeSpl commented on June 20, 2024

As @gregveres already mentioned the main job of NTypewriter is to generate TypeScript files.

SourceGenerator is the youngest addition to NTypewriter family, offering the bare minimum functionality.

Detecting C# files through extensions *.cs and adding them to compilation was planned from the beginning, but since generating C# is not a base scenario, it did not make it to the first release of SG. I would not mind if any PR appeared and added that functionality.

from ntypewriter.

amdavie avatar amdavie commented on June 20, 2024

@gregveres of course - I also generate some non-C# content

@NeVeSpl that is good to hear! I wanted to understand your vision for the SourceGenerator before I attempted my own tool, so I'm potentially interested in doing a PR. I'll need to take some time to familiarize myself with the repo, but it seems we'll need to make an assumption about which files get added to compilation without something explicit like an config option - so do you think if the template is outputting to a .cs file (e.g. Save output "MyClass.cs") then the generator would add it to source and not output the file or do we want something more explicit? Please share any thoughts on this feature as well.

from ntypewriter.

NeVeSpl avatar NeVeSpl commented on June 20, 2024

For now, I do not think that anything more explicit is necessary, just a simple check of generated file extension would be enough.

from ntypewriter.

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.