Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/vchart/bundler.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
* @type {import('@internal/bundler').Config}
*/
const fs = require('fs');
const path = require('path');

Expand All @@ -19,6 +16,9 @@ function copyStart(source, destinations) {
});
}

/**
* @type {import('@internal/bundler').Config}
*/
module.exports = {
name: 'VChart',
formats: ['es', 'cjs', 'umd'],
Expand Down
2 changes: 1 addition & 1 deletion packages/vchart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test-live": "npm run test-watch __tests__/unit/",
"test-watch": "DEBUG_MODE=1 jest --watch",
"ci": "ts-node --transpileOnly --skipProject ./scripts/trigger-test.ts",
"postinstall": "npm run build"
"postinstall": "bundle --clean -f es --ignorePostTasks"
},
"files": [
"esm",
Expand Down
1 change: 1 addition & 0 deletions tools/bundler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ bundle -f es -w dev --env __DEV__=true --env __ID__="'my_id'"
--minify 是否输出压缩后的 UMD 产物文件
-w, --watch 监听文件变化重新构建
-s, --sourcemap 是否生成 sourcemap
--ignorePostTasks, 不执行 postTasks
```

# 配置文件
Expand Down
3 changes: 2 additions & 1 deletion tools/bundler/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ async function bootstrap() {
_task(Tasks.COPY_FILES, () => copyFiles(PROJECT_ROOT, config));
taskList.push(Tasks.COPY_FILES);
}
if (config.postTasks) {

if (!args.ignorePostTasks && config.postTasks) {
const tasksKey = Object.keys(config.postTasks);
if (tasksKey.length) {
tasksKey.forEach(name => {
Expand Down
2 changes: 1 addition & 1 deletion tools/bundler/src/logic/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function parserCLIArgs(argv: string | string[]): Partial<CLIArgs> {
},
array: ['formats', 'envs', 'copy'],
string: ['config'],
boolean: ['watch', 'less', 'clean', 'minify', 'sourcemap'],
boolean: ['watch', 'less', 'clean', 'minify', 'sourcemap', 'ignorePostTasks'],
coerce: getCoerce(stringKeys)
});
}
Expand Down