fivetanley / ember-cli-migrator

migrate your files to the standard ember-cli structure, preserving git history
MIT License
106 stars 22 forks source link

Preserve Comments: #24

Closed kiwiupover closed 9 years ago

kiwiupover commented 9 years ago

Right now the a comment is preserved inside a global function but removes any comments before and after the global function.

// This comment is removed
/* global moment */ will be removed too
App.DavesComponent = Ember.Component.extend({

   // this comment is retained
   somethingCool: function(){
   }.on('didInsertElement')

})
// Also this comment is removed

If you point me in the right direction I try and write a fix.

Cheers

kiwiupover commented 9 years ago

@tonysherbondy What will take to preserve the comments. I will take a shot at writing the code if you point me in the right direction.

Cheers Dave

fivetanley commented 9 years ago

@kiwiupover I noticed this happening as well. Perhaps I could trouble @benjamn one more time with some recast advice to not have comment nodes removed. We are typically using this.remove() in the Visitor API (which I know is deprecated, we should switch soon).

tonysherbondy commented 9 years ago

@kiwiupover @fivetanley I think this has to do with the way I split files. I think I can fix it pretty quickly. Let me take a look.

kiwiupover commented 9 years ago

Thanks this will be very helpful.

Cheers

On Thursday, 15 January 2015, Anthony Sherbondy notifications@github.com wrote:

@kiwiupover https://github.com/kiwiupover @fivetanley https://github.com/fivetanley I think this has to do with the way I split files. I think I can fix it pretty quickly. Let me take a look.

— Reply to this email directly or view it on GitHub https://github.com/fivetanley/ember-cli-migrator/issues/24#issuecomment-70210260 .