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

Allowed users to specify podModulePrefix (ember-app) #7

Merged
merged 8 commits into from Jul 25, 2022

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Jul 25, 2022

Description

Closes #1. If a user specified podModulePrefix in their config/environment.js, they can pass the argument --pod-path to the codemod. At the moment, the --pod-path argument affects only Ember apps.

Note, the name podPath came from the emberjs/ember.js repo. The value refers to the "difference" between podModulePrefix and modulePrefix. For example, if a user has the following config/environment.js:

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

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

  return ENV;
};

then:

podPath = 'my-app/pods' - 'my-app' = 'pods'

So the user will need to enter the following command:

npx ember-codemod-pod-to-octane --pod-path=pods --type=app

Due to a change in APIs, this pull request unfortunately became large. There may be opportunities to refactor code. Let's do so in a separate issue and pull request.

@ijlee2 ijlee2 added the enhance: code Issue asks for new feature or refactor label Jul 25, 2022
@ijlee2 ijlee2 merged commit 78315e6 into main Jul 25, 2022
@ijlee2 ijlee2 deleted the add-support-for-pod-path branch July 25, 2022 17:58
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 this pull request may close these issues.

Account for podModulePrefix
1 participant