-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnpm-tool.js
37 lines (35 loc) · 830 Bytes
/
npm-tool.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { createFS } = require('@banez/fs');
const { createConfig } = require('@banez/npm-tool');
const { fileReplacer } = require('./file-replacer');
const fs = createFS({
base: process.cwd(),
});
module.exports = createConfig({
bundle: {
extend: [
{
title: 'Remove build info',
task: async () => {
await fs.deleteFile(['dist', 'tsconfig.tsbuildinfo']);
},
},
{
title: 'Remove tests',
task: async () => {
await fs.deleteDir(['dist', 'test']);
},
},
{
title: 'Fix imports',
task: async () => {
await fileReplacer({
basePath: '',
dirPath: ['dist'],
regex: [/servaljs\//g],
endsWith: ['.js', '.d.ts'],
});
},
},
],
},
});