Skip to content

feat(codemods): add import alias and directory helpers - #5151

Open
RomainLanz wants to merge 2 commits into
7.xfrom
feat/codemods-import-alias-and-directory
Open

RomainLanz wants to merge 2 commits into
7.xfrom
feat/codemods-import-alias-and-directory

Conversation

@RomainLanz

Copy link
Copy Markdown
Member

Package configure scripts currently have to edit the application’s package.json and create directories themselves. Adding an import alias should not require the optional Assembler package.

Add addImportAlias(alias, target) and createDirectory(path) directly to core. Existing aliases and directories remain unchanged. Updating package.json preserves its indentation and line endings.

Tests: 23 codemod tests passed; lint, typecheck and build passed. The build still reports unresolved-import warnings in factories/core/ignitor.ts.

@thetutlage

Copy link
Copy Markdown
Member

Yo, can you open a PR for the docs too? Maybe document here? https://docs.adonisjs.com/guides/concepts/scaffolding#codemods-api-reference

@RomainLanz

Copy link
Copy Markdown
Member Author

Done!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants