Skip to content

Commit 8eefac6

Browse files
authored
Merge pull request #21 from sinoui/issue_20
Issue 20
2 parents fa16e3d + 9ecc196 commit 8eefac6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 变更说明
22

3+
## v0.4.4 - 2019.8.20
4+
5+
- fix(ts-lib-scripts): 修复在 doc:dev 时,`yarn build`失败的缺陷 (#20)
6+
37
## v0.4.3 - 2019.8.20
48

59
- fix(eslint-config-ts-lib): 调整 eslint 规则

packages/ts-lib-scripts/assets/docz-template/doczrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export default {
6868
.use(require('tsconfig-paths-webpack-plugin'))
6969
.end();
7070

71+
config.watchOptions({
72+
ignored: ['node_modules', 'dist', '.cache', 'coverage', '.docz']
73+
});
74+
7175
return config;
7276
},
7377
};

packages/ts-lib-tools/src/build.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export async function createCjsIndexFile(outDir: string) {
3131
);
3232

3333
await mkdirp(outDir);
34+
3435
await util.promisify(writeFile)(
3536
resolve(outDir, 'index.js'),
3637
content.replace(
@@ -44,16 +45,7 @@ export async function createCjsIndexFile(outDir: string) {
4445
* 清除打包文件存放目录dist
4546
*/
4647
export async function clean() {
47-
try {
48-
await remove(DIST_PATH);
49-
} catch (e) {
50-
try {
51-
await remove(DIST_PATH);
52-
} catch (error) {
53-
// eslint-disable-next-line no-console
54-
console.error('清除文件夹失败', error);
55-
}
56-
}
48+
await remove(DIST_PATH);
5749
}
5850

5951
function nextTick<T>(callback: () => Promise<T>): Promise<T> {

0 commit comments

Comments
 (0)