pathpida
Version:
TypeScript friendly pages and static path generator for Next.js
13 lines • 577 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
exports.default = ({ filePath, text }) => {
if (fs_1.default.existsSync(filePath) && fs_1.default.readFileSync(filePath, 'utf8') === text)
return;
fs_1.default.writeFileSync(filePath, text, 'utf8');
console.log(`${filePath} was built successfully.`);
};
//# sourceMappingURL=writeRouteFile.js.map