Skip to content

Commit

Permalink
feat: 添加 配套插件支持
Browse files Browse the repository at this point in the history
  • Loading branch information
imsunhao committed Oct 28, 2019
1 parent af827f2 commit 2dcd4c7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
24 changes: 24 additions & 0 deletions @types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ declare namespace build {
* * 路由
*/
extensions?: options.extensions

/**
* 配套插件
* * 与 SSR 无关
* * 命令参数
*/
plugins? : Partial<options.plugins>
}
namespace options {
/**
Expand Down Expand Up @@ -383,6 +390,23 @@ declare namespace build {
[key in string]: Configuration
}

/**
* 配套插件
*/
type plugins = {
/**
* custom build element-ui
* - 来源 @bestminr/ui-xxx 项目
*/
'build-style': {
/**
* element-variables.scss 路径
*/
entry: string
output: string
}
}

/**
* exclude 排除 第三方包
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"service:dev": "./bin/dev",
"service:bootstrap-storybook": "./bin/storybook"
},
"main": "./dist/index.js",
"main": "dist/index.js",
"typings": "@types/index.d.ts",
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ export function resoveBuildConfig(INJECT_CONTEXT, CONFIG) {
// })
// console.log('--------------------------')
return options
}
}

export { initConfig } from 'src/utils'

0 comments on commit 2dcd4c7

Please sign in to comment.