Transforms a flat colocated component structure to a nested colocated component structure.
- Works for apps and addons (v1, v2 and in-repo addons)
- Supports reverting to a flat colocated component structure
- Ignores component files that already comply to the desired component structure
- Takes into account CSS module files (in case you are using ember-css-modules)
NOTE: Use ember-component-template-colocation-migrator if you want to transform a classic component structure to a flat or nested colocated component structure.
- Node.js v18 or above
cd your/app-or-addon/path
npx github:bertdeblock/ember-flat-to-nested
your-app-name
├── app
│ └── components
│ ├── foo
│ │ ├── bar.hbs
│ │ └── bar.js
│ ├── foo.hbs
│ └── foo.js
│ ...
your-app-name
├── app
│ └── components
│ └── foo
│ ├── bar
│ │ ├── index.hbs
│ │ └── index.js
│ ├── index.hbs
│ └── index.js
│ ...
cd your/app-or-addon/path
npx github:bertdeblock/ember-flat-to-nested --revert
your-app-name
├── app
│ └── components
│ └── foo
│ ├── bar
│ │ ├── index.hbs
│ │ └── index.js
│ ├── index.hbs
│ └── index.js
│ ...
your-app-name
├── app
│ └── components
│ ├── foo
│ │ ├── bar.hbs
│ │ └── bar.js
│ ├── foo.hbs
│ └── foo.js
│ ...