1/* 2 * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. 3 * License: MS-RSL – see LICENSE.md for details 4 */ 5 6// The whole purpose of this is to only load prettier if we really need it – this saves a few MB of project memory usage 7 8let instance: { format: Function } | null = null; 9 10export function get_prettier() { 11 if (instance == null) { 12 instance = require("prettier"); 13 } 14 return instance; 15} 16 17