mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			551 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			551 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import fs from "fs";
 | 
						|
import path from "path";
 | 
						|
import { CN_MASKS } from "./cn";
 | 
						|
import { TW_MASKS } from "./tw";
 | 
						|
import { EN_MASKS } from "./en";
 | 
						|
 | 
						|
import { type BuiltinMask } from "./typing";
 | 
						|
 | 
						|
const BUILTIN_MASKS: Record<string, BuiltinMask[]> = {
 | 
						|
  cn: CN_MASKS,
 | 
						|
  tw: TW_MASKS,
 | 
						|
  en: EN_MASKS,
 | 
						|
};
 | 
						|
 | 
						|
const dirname = path.dirname(__filename);
 | 
						|
 | 
						|
fs.writeFile(
 | 
						|
  dirname + "/../../public/masks.json",
 | 
						|
  JSON.stringify(BUILTIN_MASKS, null, 4),
 | 
						|
  function (error) {
 | 
						|
    if (error) {
 | 
						|
      console.error("[Build] failed to build masks", error);
 | 
						|
    }
 | 
						|
  },
 | 
						|
);
 |