Skip to content

Commit

Permalink
Refine
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <i@ryanc.cc>
  • Loading branch information
ruibaby committed Nov 26, 2023
1 parent 79bd41b commit bc96ce2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
48 changes: 24 additions & 24 deletions console/packages/ui-plugin-bundler-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"name": "@halo-dev/ui-plugin-bundler-kit",
"version": "1.0.0",
"license": "MIT",
"homepage": "https://github.com/halo-dev/halo/tree/main/console/packages/ui-plugin-bundler-kit#readme",
"bugs": {
"url": "https://github.com/halo-dev/halo/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/halo-dev/halo.git",
"directory": "console/packages/ui-plugin-bundler-kit"
},
"license": "GPL-3.0",
"author": "@halo-dev",
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"dev": "unbuild --stub",
"build": "unbuild",
"dev": "unbuild --stub",
"prepublishOnly": "pnpm run build"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/halo-dev/halo.git",
"directory": "console/packages/ui-plugin-bundler-kit"
},
"bugs": {
"url": "https://github.com/halo-dev/halo/issues"
"devDependencies": {
"@halo-dev/api-client": "workspace:*",
"@types/js-yaml": "^4.0.9",
"js-yaml": "^4.1.0",
"unbuild": "^0.7.6"
},
"homepage": "https://github.com/halo-dev/halo/tree/main/console/packages/ui-plugin-bundler-kit#readme",
"peerDependencies": {
"vite": "^4.0.0 || ^5.0.0"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"js-yaml": "^4.1.0",
"unbuild": "^0.7.6",
"@halo-dev/api-client": "workspace:*"
"engines": {
"node": "^18.0.0 || >=20.0.0"
}
}
3 changes: 3 additions & 0 deletions console/packages/ui-plugin-bundler-kit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ export function HaloUIPluginBundlerKit(): Plugin {
name: "halo-ui-plugin-bundler-kit",
config(config, env) {
const isProduction = env.mode === "production";

// fixme: allow user to config outDir
const outDir = isProduction
? "../src/main/resources/console"
: "../build/resources/main/console";

// fixme: allow user to config manifest path
const manifest = yaml.load(
fs.readFileSync("../src/main/resources/plugin.yaml", "utf8")
) as HaloPlugin;
Expand Down

0 comments on commit bc96ce2

Please sign in to comment.