question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generators: add ability to destroy generated files

See original GitHub issue

In Rails there is a destroy command that acts as the evil twin of generate:

rails generate scaffold Post
rails destroy scaffold Post

Let’s do the same thing in Redwood. The generators themselves just return a list of files/routes so we should be able to use those lists in a destroy process to remove the files created and match and remove the routes.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
peterpcommented, Apr 28, 2020

@antonmoiseev That would be amazing

1reaction
antonmoiseevcommented, Apr 28, 2020

Can I help with finishing this up? I’ve quickly prototyped destroy command for a couple of components, it looks like something I could do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# Source Generators Remove Files Before Build
An easy work around for this is to remove the generated types from compilation. This is not desired because the devs will loose...
Read more >
Allow overriding generator template files · Issue #8914 · nrwl/nx
I would like for consumers to know which files are created from the generator (including the ability to copy the template, so they...
Read more >
Saving source generator output in source control
In this post I show how to emit your source generator output to disk, so you can include it in source control and...
Read more >
How to Use Generators and yield in Python
In this step-by-step tutorial, you'll learn about generators and yielding in Python. You'll create generator functions and generator expressions using ...
Read more >
Python Generators (With Examples) - Programiz
Example 2: Python Generator Expression ... Here, we have created the generator object that will produce the squares of the numbers 0 through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found