@nx/next
Version:
17 lines (16 loc) • 737 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = createAiInstructionsForNext16;
const path_1 = require("path");
const fs_1 = require("fs");
async function createAiInstructionsForNext16(tree) {
const pathToAiInstructions = (0, path_1.join)(__dirname, 'files', 'ai-instructions-for-next-16.md');
if (!(0, fs_1.existsSync)(pathToAiInstructions)) {
return;
}
const contents = (0, fs_1.readFileSync)(pathToAiInstructions, 'utf-8');
tree.write('tools/ai-migrations/MIGRATE_NEXT_16.md', contents);
return [
`We created 'tools/ai-migrations/MIGRATE_NEXT_16.md' with instructions for an AI Agent to help migrate your Next.js projects to Next.js 16.`,
];
}