/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v25.7.0
test/fixtures/compile-cache-wrapper.js
21 строка
795 B
Joyee Cheung
src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE
29 авг 2024, 02:22
Не верифицирован
29 авг 2024, 02:22
ff5ef70
Код
Авторство
О чём код?
'use strict'; const { enableCompileCache, getCompileCacheDir, constants } = require('module'); console.log('dir before enableCompileCache:', getCompileCacheDir()); const result = enableCompileCache(process.env.NODE_TEST_COMPILE_CACHE_DIR); switch (result.status) { case constants.compileCacheStatus.FAILED: console.log('Compile cache failed. ' + result.message); break; case constants.compileCacheStatus.ENABLED: console.log('Compile cache enabled. ' + result.directory); break; case constants.compileCacheStatus.ALREADY_ENABLED: console.log('Compile cache already enabled.'); break; case constants.compileCacheStatus.DISABLED: console.log('Compile cache already disabled.'); break; } console.log('dir after enableCompileCache:', getCompileCacheDir());