fivetanley / ember-cli-migrator

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

A more conical application.js file test. #59

Closed kiwiupover closed 9 years ago

kiwiupover commented 9 years ago

This fixes #56

in the test current application.js test uses:

window.App = Ember.Application.extend({});

Ember Rails and the Yeoman generate sets up the application.js file like this:

App = Ember.Application.create({});

The the application.js file without the window.App namespace will be migrated to this.

import Ember from 'ember';
Pos = Ember.Application.create({
});
export default undefined;

Once you create the ember-cli app by runing ember init after the migration the application.js file is no longer needed. Here is the workflow I suggest for migrating their apps.

  1. run find javascripts -name '.gitkeep' -delete to delete any .gitkeep files
  2. run the ember-cli-migrator over your global ember app
  3. run ember init in the folder containing the app folder
  4. move/delete any js files that might be out of place in your app.

The last step would include deleting the application.js file.

At some point we could move all .js files not recognized by the migrator to an unknown-javascripts folder during the processing phase.

I would love to hear you feedback.

kiwiupover commented 9 years ago

@igorT thoughts

igorT commented 9 years ago

Thanks! Seems reasonable to me