-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbeforeDist.js
32 lines (28 loc) · 977 Bytes
/
beforeDist.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
const shelljs = require('shelljs')
let unpacked = null
let fpresolver = null
switch (process.platform) {
case 'win32':
unpacked = 'win-unpacked'
fpresolver = '\\'
break;
case 'linux':
unpacked = 'linux-unpacked'
fpresolver = '/'
break;
default:
unpacked = 'mac-unpacked'
fpresolver = '/'
}
function removeUnnecessary () {
shelljs.rm('-rf',
__dirname + fpresolver + 'src' + fpresolver + 'index.min.js',
__dirname + fpresolver + 'src' + fpresolver + 'react' + fpresolver + 'inf.min.js',
__dirname + fpresolver + 'prod' + fpresolver + 'dist' + fpresolver + unpacked + fpresolver + 'pdf_viewer_resources.pak',
__dirname + fpresolver + 'prod' + fpresolver + 'dist' + fpresolver + unpacked + fpresolver + 'locales' + fpresolver,
__dirname + fpresolver + 'prod' + fpresolver + 'dist' + fpresolver + unpacked + fpresolver + 'pyproto' + fpresolver
)
}
exports.default = async function(context) {
removeUnnecessary()
}