-
Notifications
You must be signed in to change notification settings - Fork 22
/
scriptable.config.js
53 lines (42 loc) · 1.25 KB
/
scriptable.config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// @ts-check
const path = require('path')
/**项目根目录,不建议修改*/
const rootPath = __dirname
/**输入文件,当 compileType 为 one 时生效,不建议修改*/
const inputFile = path.resolve(rootPath, './src/index.ts')
/**输入文件夹,当 compileType 为 all 时生效,不建议修改*/
const inputDir = path.resolve(rootPath, './src/scripts')
/**输出文件夹,不建议修改*/
const outputDir = path.resolve(rootPath, './dist')
/**是否压缩代码*/
const minify = process.env.NODE_ENV === 'production'
/**是否加密代码*/
const encrypt = process.env.NODE_ENV === 'production'
/**往编译后的代码头部插入的代码*/
const header = `
/**
* 作者: 小明
* 版本: 1.0.0
* 更新时间:${new Date().toLocaleDateString()}
* github: https://github.com/2214962083/ios-scriptable-tsx
*/
`
module.exports = /** @type { import ('./src/lib/compile').CompileOptions } */ ({
rootPath,
inputFile,
inputDir,
outputDir,
minify,
encrypt,
header,
/**
* esbuild 自定义配置
* see: https://esbuild.github.io/api/#simple-options
*/
esbuild: {},
/**
* javascript-obfuscator 自定义配置
* see: https://github.com/javascript-obfuscator/javascript-obfuscator
*/
encryptOptions: {},
})