@mypaas/hcm-cli
Version:
Vant Cli 是一个 Vue 组件库构建工具,通过 Vant Cli 可以快速搭建一套功能完备的 Vue 组件库。
16 lines (15 loc) • 827 B
JavaScript
;
// @ts-ignore
const babelJest = require('babel-jest');
// @ts-ignore
const { process, createTransformer } = babelJest;
module.exports = Object.assign(Object.assign({}, babelJest), { process(src, filename, config, transformOptions) {
// @ts-ignore
return process(src.replace(/([vV])an([-A-Z])/g, ($0, $1, $2) => `${$1 === 'v' ? 'h' : 'H'}cm${$2}`), filename, config, transformOptions);
},
createTransformer(userOptions) {
const transformer = createTransformer(userOptions);
return Object.assign(Object.assign({}, transformer), { process(src, filename, config, transformOptions) {
return transformer.process(src.replace(/([vV])an([-A-Z])/g, ($0, $1, $2) => `${$1 === 'v' ? 'h' : 'H'}cm${$2}`), filename, config, transformOptions);
} });
} });