-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:nextui-org/nextui-cli into refactor…
…/eng-1847-nextui-cli-to-heroui-cli
- Loading branch information
Showing
19 changed files
with
310 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/codemod/src/helpers/actions/lint-affected-files.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {tryLintFile} from '../lint'; | ||
import {affectedFiles} from '../store'; | ||
|
||
export async function lintAffectedFiles() { | ||
try { | ||
await tryLintFile(Array.from(affectedFiles)); | ||
} catch (error) { | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/codemod/src/helpers/actions/migrate/migrate-left-files.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { | ||
HEROUI_PLUGIN, | ||
HEROUI_PREFIX, | ||
NEXTUI_PLUGIN, | ||
NEXTUI_PREFIX | ||
} from '../../../constants/prefix'; | ||
import {getStore, updateAffectedFiles, writeFileAndUpdateStore} from '../../store'; | ||
|
||
export function migrateLeftFiles(files: string[]) { | ||
for (const file of files) { | ||
const rawContent = getStore(file, 'rawContent'); | ||
const replaceContent = rawContent | ||
.replaceAll(NEXTUI_PREFIX, HEROUI_PREFIX) | ||
.replaceAll(NEXTUI_PLUGIN, HEROUI_PLUGIN); | ||
|
||
writeFileAndUpdateStore(file, 'rawContent', replaceContent); | ||
updateAffectedFiles(file); | ||
} | ||
} |
Oops, something went wrong.