# sch-ui **Repository Path**: its-wild/sch-ui ## Basic Information - **Project Name**: sch-ui - **Description**: 校园UI库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-04 - **Last Updated**: 2022-08-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 安装测试依赖 ```bash yarn add jest @vue/test-utils vue-jest babel-jest -D -W ``` ## Jest 的配置 jest.config.js ```js module.exports = { "testMatch": ["**/__tests__/**/*.[jt]s?(x)"], "moduleFileExtensions": [ "js", "json", // 告诉 Jest 处理 `*.vue` 文件 "vue" ], "transform": { // 用 `vue-jest` 处理 `*.vue` 文件 ".*\\.(vue)$": "vue-jest", // 用 `babel-jest` 处理 js ".*\\.(js)$": "babel-jest" } } ``` ## Babel 的配置 babel.config.js ```js module.exports = { presets: [ [ '@babel/preset-env' ] ] } ``` ## Babel 的桥接 ```bash yarn add babel-core@bridge -D -W ``` ## 安装 Rollup 以及所需的插件 ```bash yarn add rollup rollup-plugin-terser rollup-plugin-vue@5.1.9 vue-template-compiler -D -W ``` ## Rollup 配置文件 在 button 目录中创建 rollup.config.js ```js import { terser } from 'rollup-plugin-terser' import vue from 'rollup-plugin-vue' module.exports = [ { input: 'index.js', output: [ { file: 'dist/index.js', format: 'es' } ], plugins: [ vue({ // Dynamically inject css as a