Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for podModulePrefix #1

Closed
ijlee2 opened this issue Jul 22, 2022 · 0 comments · Fixed by #7
Closed

Account for podModulePrefix #1

ijlee2 opened this issue Jul 22, 2022 · 0 comments · Fixed by #7
Labels
enhance: code Issue asks for new feature or refactor

Comments

@ijlee2
Copy link
Owner

ijlee2 commented Jul 22, 2022

Currently, the codemod assumes that podModulePrefix: '<my-app-name>' (i.e. equal to the value of modulePrefix). However, it's possible that a team has set another value such as '<my-app-name>/pods'.

/* config/environment.js */
'use strict';

module.exports = function (environment) {
  let ENV = {
    modulePrefix: 'my-app',
    podModulePrefix: 'my-app/pods',
    ...
  };

  return ENV;
};
❯ ember g component my-component --gc

installing component
  create app/pods/components/my-component/component.js
  create app/pods/components/my-component/template.hbs
installing component-test
  create tests/integration/pods/components/my-component/component-test.js

❯ ember g route my-route
installing route
  create app/pods/my-route/route.js
  create app/pods/my-route/template.hbs
installing route-test
  create tests/unit/pods/my-route/route-test.js

❯ ember g controller my-route
installing controller
  create app/pods/my-route/controller.js
installing controller-test
  create tests/unit/pods/my-route/controller-test.js
@ijlee2 ijlee2 added the enhance: code Issue asks for new feature or refactor label Jul 22, 2022
@ijlee2 ijlee2 closed this as completed in #7 Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance: code Issue asks for new feature or refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant