所以我不小心删除了Angular 4项目,但是我仍然有所有文件夹和打包代码的dist文件夹.因此,有什么办法可以恢复所有项目布局,以便我可以继续在编辑器中进行编码,还是永远消失了? 谢谢.
So I accidentally deleted my Angular 4 project but I still have dist folder with all bundles and code packed. So is there any way I can restore all the project layout so I can continue coding in my editor or is it gone forever? Thanks.
推荐答案否.
如果没有项目文件,则无法对Angular应用程序进行逆向工程以获取源代码.如果编译后的代码与Angular的视图引擎不太紧密(如果您一直在使用最佳实践进行开发,则不应该如此),则可以窥视一下编译后的代码以获取一些业务逻辑,然后尝试恢复它.
If you do not have project files, you cannot reverse-engineer Angular application to get source back. You can take a peek at compiled code to get some business logic if it's not too tied with Angular's view engine (which it shouldn't be if you've been developing with best practices) and try restoring that, though.
这就像试图从只有5个回到2 + 3一样.您不知道它是否是3 + 2,1 + 4,4 +1.Angular编译您的应用程序,并且没有1-1映射. 特别是,当您认为自己也一直在使用TypeScript时. Angular的构建向它输出了两个编译器和一个远离原始的捆绑器.不可逆的.
It's like trying to go back to 2 + 3 from having only 5. You have no idea if it was 3 + 2, 1 + 4, 4 + 1. Angular compiles your application, and there's no 1-1 mapping. Especially when you consider that you've also been using TypeScript. Angular's build output it two compilers and a bundler away from original. Irreversible.
这是有关编译外观的更详细细分.
Here's a more detailed breakdown of how compilation looks like.
更多推荐
从dist文件夹还原Angular 4项目
发布评论