UNPKG

@tarojs/plugin-generator

Version:
26 lines 927 B
"use strict"; /* eslint-disable no-console */ Object.defineProperty(exports, "__esModule", { value: true }); exports.updateDeps = void 0; const utils_1 = require("../../utils"); const getDeps = (version) => { const deps = { devDependencies: { tailwindcss: version === '4x' ? '^4.1.7' : '3.4.17', 'weapp-tailwindcss': '^4.1.7', '@tailwindcss/postcss': '^4.1.7', }, }; return deps; }; async function updateDeps(options) { const { ctx, tailwindcssVersion } = options; const patch = { ...getDeps(tailwindcssVersion) }; if (tailwindcssVersion === '4x') { // 这是为了给 tailwindcss@4 打上支持 rpx 单位的补丁,否则它会把 rpx 认为是一种颜色 patch.scripts = { postinstall: 'weapp-tw patch' }; } return (0, utils_1.updatePkgJson)(ctx, patch); } exports.updateDeps = updateDeps; //# sourceMappingURL=deps.js.map