Skip to content

Commit

Permalink
add a bit shit to refact
Browse files Browse the repository at this point in the history
  • Loading branch information
imal1 committed Sep 19, 2024
1 parent a7a2994 commit 39c799c
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 1,314 deletions.
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,28 +126,19 @@
}
},
"files": [
"*.d.ts",
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch src",
"build:fix": "esno scripts/postbuild.ts",
"lint": "eslint .",
"play": "npm -C playground run dev",
"prepublishOnly": "pnpm run build",
"release": "bumpp && pnpm publish",
"start": "esno src/index.ts",
"test": "vitest"
},
"peerDependencies": {
"@farmfe/core": ">=1",
"@nuxt/kit": "^3",
"@nuxt/schema": "^3",
"esbuild": "*",
"rollup": "^3",
"vite": ">=3",
"webpack": "^4 || ^5"
},
"peerDependenciesMeta": {
"@farmfe/core": {
"optional": true
Expand Down Expand Up @@ -176,6 +167,7 @@
},
"devDependencies": {
"@antfu/eslint-config": "^3.6.2",
"@antfu/utils": "^0.7.10",
"@nuxt/kit": "^3.13.2",
"@nuxt/schema": "^3.13.2",
"@types/node": "^22.5.5",
Expand All @@ -185,13 +177,15 @@
"eslint": "^9.10.0",
"esno": "^4.7.0",
"fast-glob": "^3.3.2",
"local-pkg": "^0.5.0",
"nodemon": "^3.1.5",
"rimraf": "^6.0.1",
"rollup": "^4.22.0",
"svg-parser": "^2.0.4",
"tsup": "^8.3.0",
"typescript": "^5.6.2",
"unconfig": "^0.5.5",
"unimport": "^3.12.0",
"vite": "^5.4.6",
"vitest": "^2.1.1",
"webpack": "^5.94.0"
Expand Down
1 change: 0 additions & 1 deletion playground/iconfont.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { defineConfig } from '../src'
export default defineConfig([
{
url: '//at.alicdn.com/t/c/font_3998853_ms3o2yu816s.js',
fileName: 'iconfont-common.js',
prefix: 'iconfont',
iconJson: true,
iconifyJson: true,
Expand Down
3 changes: 2 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "playground",
"private": true,
"scripts": {
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x rspack serve"
"dev": "nodemon -w '../src/**/*.ts' -e .ts -x rsbuild dev"
},
"devDependencies": {
"@rsbuild/core": "^1.0.4",
"@rspack/cli": "^1.0.5",
"@rspack/core": "^1.0.5",
"vite": "^5.4.2",
Expand Down
20 changes: 20 additions & 0 deletions playground/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from '@rsbuild/core'
import Unplugin from '../src/rspack'

export default defineConfig({
html: {
mountId: 'app',
},
source: {
entry: {
index: './main.ts',
},
},
tools: {
rspack: {
plugins: [
Unplugin({ configFile: './iconfont.config.ts' }),
],
},
},
})
Loading

0 comments on commit 39c799c

Please sign in to comment.