UNPKG

360 BJavaScriptView Raw
1const path = require('path')
2const getCwd = require('../utils/get-cwd')
3
4/**
5 * 获取打包过程临时目录
6 * @param {String} [cwd]
7 * @param {String} [type]
8 * @returns {String} 如果提供 `type`,则返回对应类型的目录
9 */
10module.exports = (cwd = getCwd(), type = "") => path.resolve(
11 cwd, 'logs/tmp', type ? `.${type}` : ''
12)