diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index cc71d828..998fc4b3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -26,10 +26,6 @@ jobs: with: node-version: 20 registry-url: 'https://registry.npmjs.org' - - name: 'Setup pnpm' - uses: pnpm/action-setup@v3 - with: - version: 8 - name: 'install' run: npm install - name: 'lint' @@ -66,9 +62,6 @@ jobs: path: './docs' deploy: needs: build - permissions: - pages: write - id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/.gitignore b/.gitignore index e3d5cb7e..8068f109 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ __snapshots__ package-lock.json yarn.lock pnpm-lock.yaml +*.less.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 2147c769..28fea1f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ ### 📚 Documentation +- cssModuleDefinition 为 cssModule 生成准确的声明文件 ([53003f3](https://github.com/monako97/neko-ui/commit/53003f3f42bdc426c2c24200148fb295399e510a)) +- feat copy ([8badba6](https://github.com/monako97/neko-ui/commit/8badba6b2e36643823285c81a993d413aaa7a1d2)) +- fix jekyll ([6bb89c7](https://github.com/monako97/neko-ui/commit/6bb89c7bef284a2e7b85de9d12baff74b795f8e3)) +- 更新 @moneko/core ([b77eb1c](https://github.com/monako97/neko-ui/commit/b77eb1c0fbaba716d12bfb44761af2701445dc15)) + +### ✨ Features + +- update @moneko/css ([b27e32e](https://github.com/monako97/neko-ui/commit/b27e32e328f3722c88a73d3369f1a024c70e7a3c)) +- 更新 solid-js@1.8.17 ([5947d12](https://github.com/monako97/neko-ui/commit/5947d122353dc58406ba48266020d0814adddc74)) + +## [2.7.1](https://github.com/monako97/neko-ui/compare/2.7.0...2.7.1) (4-20-2024) + +### 📚 Documentation + +- 更新actions ([0e9990e](https://github.com/monako97/neko-ui/commit/0e9990e1a850c47485175cb1e70ad9332aff26bf)) - 更新actions ([0904b1a](https://github.com/monako97/neko-ui/commit/0904b1a4e03be89bf67982a68f9e9aaccb1a6b69)) - 更新actions ([87de451](https://github.com/monako97/neko-ui/commit/87de451365a869fca0c16ae5698f3870b77dd580)) - nojekyll替换为jekyll ([3051a91](https://github.com/monako97/neko-ui/commit/3051a91d07afd01dde526dace9a2a159f2c7bba0)) diff --git a/components/@moneko/config/README.mdx b/components/@moneko/config/README.mdx index a70daa6d..0d3ca9d8 100644 --- a/components/@moneko/config/README.mdx +++ b/components/@moneko/config/README.mdx @@ -16,50 +16,50 @@ order: 10 ## ConfigType -| 属性 | 说明 | 类型 | 默认值 | -| ----------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------ | -| clean | 清除过时的打包文件 | boolean | true | -| compiler | 编译方式 | swc\|tsc | swc | -| swcrc | swc 配置项 | SwcConfig \| ((isDev: boolean) => SwcConfig) | - | -| entry | 额外的 entry, 比如兼容 es10 的 object.fromentries | `Record` | - | -| minifier | js、css 压缩配置 | \{ type?: swc\|tsc; options?: [SwcOptions][1] \| [TerserOptions][2]; css?: cssnano \| parcelCss} | - | -| env | 环境变量, 可通过 process.env 获取 | `Record` | - | -| sourceMap | sourceMap 配置 | SourceMapDevToolPluginOptions \| false | - | -| devtool | devtool 配置 | Configuration['devtool'] | - | -| alias | 路径别名映射 | Record\ | - | -| basename | 根路由 | string | / | -| publicPath | 资源根路径 | string | auto | -| rem | 设置与设计图相匹配的rem | \{designSize: number} | \{designSize: 1680} | -| fallbackCompPath | 自定义容错组件路径 | string | - | -| modifyVars | less 全局变量 | `Record` | - | -| prefixCls | 类名前缀 | string | n | -| moduleRules | 自定义 webpack module rules | | - | -| cssModules | node_modules 中, 需要开启 cssModules 的模块 | string[] | - | -| importOnDemand | 按需引入 | SwcImportOnDemandTransform \| TsImportPlugin.Options | - | -| proxy | 服务器代理 | `Record` | - | -| cacheDirectory | 自定义缓存目录,为 false 时,不使用缓存 | string \| false | - | -| devServer | 开发服务器设置 | `Record` | - | -| assetHtml | 自定义插入 html 的 js 和 css | AssetHtmlOptions[] | - | -| htmlPluginOption | HtmlWebpackPlugin Option | HtmlWebpackPluginOptions | - | -| routerMode | 路由模式 | hash \| browser \| memory | browser | -| plugins | webpack 插件 | | - | -| splitChunk | 对生产 chunk 进行拆分 | false \| OptimizationSplitChunksOptions | - | -| output | 编译输出路径 | string | - | -| runtimeChunk | 拆分 runtime | boolean\|single \| multiple\| \{ name?: string \| Function }; | - | -| moduleFederation | 模块联邦 | ModuleFederationOption[] | - | -| externals | 跳过编译的模块 | string[] | - | -| rulesInclude | 需要进入到规则的模块或者位置 | \{ less?: string[]; css?: string[]; js?: string[]; media?: string[]; fonts?: string[]; } | - | -| bundleAnalyzer | js打包体积分析 | \{ analyzerMode: string; reportFilename: string; openAnalyzer: false } | - | -| prefixJsLoader | 解析js/ts的前置loader | - | - | -| bar | 是否打包显示进度条 | - | true | -| theme | 设置主题, 可以在 `@app/info` 中获取值 | - | - | -| seo | 配置seo优化 | \{domain: string; jekyll?: boolean; path?: string;} | true | -| done | 打包完成执行的回调 | () => void | - | -| mdx | mdx loader的配置项 | MDXOptions | - | -| jsxDomExpressions | 使用solidjs时jsx-dom-expressions的配置项 | JsxDomExpressions | - | -| virtualModule | 自定义虚拟模块 | `Record` | - | -| normalizeCss | 是否使用 normalize css | boolean | true | - +| 属性 | 说明 | 类型 | 默认值 | +| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------- | +| clean | 清除过时的打包文件 | boolean | true | +| compiler | 编译方式 | swc\|tsc | swc | +| swcrc | swc 配置项 | SwcConfig \| ((isDev: boolean) => SwcConfig) | - | +| entry | 额外的 entry, 比如兼容 es10 的 object.fromentries | `Record` | - | +| minifier | js、css 压缩配置 | \{ type?: swc\|tsc; options?: [SwcOptions][1] \| [TerserOptions][2]; css?: cssnano \| parcelCss} | - | +| env | 环境变量, 可通过 `process.env` 或 `@app/env` 获取 | `Record` | - | +| sourceMap | sourceMap 配置 | SourceMapDevToolPluginOptions \| false | - | +| devtool | devtool 配置 | Configuration['devtool'] | - | +| alias | 路径别名映射 | Record\ | - | +| basename | 根路由 | string | / | +| publicPath | 资源根路径 | string | auto | +| rem | 设置与设计图相匹配的rem | \{designSize: number} | \{designSize: 1680} | +| fallbackCompPath | 自定义容错组件路径 | string | - | +| modifyVars | less 全局变量 | `Record` | - | +| prefixCls | 类名前缀 | string | n | +| moduleRules | 自定义 webpack module rules | | - | +| cssModules | node_modules 中, 需要开启 cssModules 的模块 | string[] | - | +| cssModuleDefinition | 为 cssModule 生成准确的声明文件 | boolean | true | +| importOnDemand | 按需引入 | SwcImportOnDemandTransform \| TsImportPlugin.Options | - | +| proxy | 服务器代理 | `Record` | - | +| cacheDirectory | 自定义缓存目录,为 false 时,不使用缓存 | string \| false | - | +| devServer | 开发服务器设置 | `Record` | - | +| copy | 需要拷贝到输出目录的文件 | CopyPluginOption | - | +| htmlPluginOption | HtmlWebpackPlugin Option | HtmlWebpackPluginOptions | - | +| routerMode | 路由模式 | hash \| browser \| memory | browser | +| plugins | webpack 插件 | | - | +| splitChunk | 对生产 chunk 进行拆分 | false \| OptimizationSplitChunksOptions | - | +| output | 编译输出路径 | string | - | +| runtimeChunk | 拆分 runtime | boolean\|single \| multiple\| \{ name?: string \| Function }; | - | +| moduleFederation | 模块联邦 | ModuleFederationOption[] | - | +| externals | 跳过编译的模块 | string[] | - | +| rulesInclude | 需要进入到规则的模块或者位置 | \{ less?: string[]; css?: string[]; js?: string[]; media?: string[]; fonts?: string[]; } | - | +| bundleAnalyzer | js打包体积分析 | \{ analyzerMode: string; reportFilename: string; openAnalyzer: false } | - | +| prefixJsLoader | 解析js/ts的前置loader | - | - | +| bar | 是否打包显示进度条 | - | true | +| theme | 设置主题, 可以在 `@app/info` 中获取值 | - | - | +| seo | 配置seo优化 | \{domain: string; jekyll?: boolean; path?: string;} | true | +| done | 打包完成执行的回调 | () => void | - | +| mdx | mdx loader的配置项 | MDXOptions | - | +| jsxDomExpressions | 使用solidjs时jsx-dom-expressions的配置项 | JsxDomExpressions | - | +| virtualModule | 自定义虚拟模块 | `Record` | - | +| normalizeCss | 是否使用 normalize css | boolean | true | ### SwcOptions @@ -93,7 +93,6 @@ order: 10 | dashed_case | 破折号式: 每个单词全小写或全大写,多单词使用`-`隔开 | | snake_case | 蛇形命名: 每个单词全小写或全大写,多单词使用`_`隔开 | - ### 配置案例 MemberTransformer ```javascript @@ -132,12 +131,11 @@ import isFunction from 'lodash/isFunction'; | filename | 打包的模块文件名 | string | `remote_entry.js` | | name | 模块名称,唯一性,不能重名 | string | - | | remotes | 表示作为 Host 时, 去消费哪些 Remote | `ModuleFederationRemotes`[] | - | -| exposes | 当前模块具体导出去的内容 | `string` \| \{ name: `string`; path: `string`; } | - | +| exposes | 当前模块具体导出去的内容 | `string` \| \{ name: `string`; path: `string`; } | - | | shared | 优先用 Host 的依赖, 如果 Host 没有, 再用自己的 | `Record`\|`string`[] | - | -| library | library | \{ type: `var` \| `string`; name: `string`; } | - | +| library | library | \{ type: `var` \| `string`; name: `string`; } | - | | runtime | runtime | string | - | - ### ModuleFederationRemotes | 属性 | 说明 | 类型 | 默认值 | diff --git a/config/github.ts b/config/github.ts index 03ff7dab..ab9ad033 100644 --- a/config/github.ts +++ b/config/github.ts @@ -5,7 +5,7 @@ const conf: Partial = { bar: false, seo: { domain: 'monako97.github.io', - jekyll: true, + jekyll: false, }, basename: `/${PACKAGENAME}`, publicPath: `/${PACKAGENAME}/`, diff --git a/package.json b/package.json index 1c8d3586..e2de2c60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "neko-ui", - "version": "2.7.1", + "version": "2.7.4", "description": "WebComponents UI Libraries", "main": "es/index.js", "scripts": { @@ -41,34 +41,34 @@ "ui libraries" ], "devDependencies": { - "@commitlint/cli": "19.2.2", + "@commitlint/cli": "19.3.0", "@commitlint/config-conventional": "19.2.2", - "@moneko/cli": "2.9.3", - "@moneko/core": "3.11.3", - "@moneko/solid": "1.7.6", + "@moneko/cli": "2.10.0", + "@moneko/core": "3.15.2", + "@moneko/solid": "1.7.7", "@solidjs/testing-library": "0.8.7", "@swc/jest": "0.2.36", - "@testing-library/jest-dom": "6.4.2", + "@testing-library/jest-dom": "6.4.5", "@types/jest": "29.5.12", "babel-loader": "9.1.3", - "eslint-config-neko": "2.6.0", - "eslint-plugin-solid": "0.13.2", + "eslint-config-neko": "2.7.2", + "eslint-plugin-solid": "0.14.0", "husky": "9.0.11", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "n-code-live": "1.1.0", "n-katex": "1.0.8", "shadow-dom-testing-library": "1.11.2", - "stylelint-config-moneko": "2.3.1" + "stylelint-config-moneko": "2.4.0" }, "dependencies": { "@moneko/common": "1.3.2", - "@moneko/css": "1.1.3", + "@moneko/css": "1.1.4", "custom-element-type": "1.0.3", - "dayjs": "1.11.10", + "dayjs": "1.11.11", "marked-completed": "1.2.14", "solid-element": "1.8.0", - "solid-js": "1.8.16" + "solid-js": "1.8.17" }, "files": [ "es", diff --git a/site/router/index.ts b/site/router/index.ts index d3ab7f93..983fd7b3 100644 --- a/site/router/index.ts +++ b/site/router/index.ts @@ -1,13 +1,10 @@ -import { type Component, lazy } from 'solid-js'; +import { lazy } from 'solid-js'; import type { RouteConfig } from '@app/routes'; -import type { RouteSectionProps } from '@moneko/solid'; const router: RouteConfig[] = [ { path: '/', - component: lazy( - () => import(/* webpackChunkName: "layout" */ '@/layout'), - ) as unknown as Component>, + component: lazy(() => import(/* webpackChunkName: "layout" */ '@/layout')), children: [ { path: '/',