-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·43 lines (39 loc) · 1.56 KB
/
build.sh
File metadata and controls
executable file
·43 lines (39 loc) · 1.56 KB
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
#!/bin/bash
./node_modules/.bin/rollup -c
mkdir -p release
uglifyjs build/thinkingdata.global.js -c -m -o release/thinkingdata.min.js
uglifyjs build/thinkingdata.umd.js -c -m -o ./release/thinkingdata.umd.min.js
uglifyjs build/thinkingdata.esm.js -c -m -o ./release/thinkingdata.esm.min.js
#uglifyjs build/thinkingdata.amd.js -c -m -o ./release/thinkingdata.amd.min.js
uglifyjs build/thinkingdata.cjs.js -c -m -o ./release/thinkingdata.cjs.min.js
#uglifyjs thinkingdata_jslib_snippet.js -c -m -o release/thinkingdata_jslib_snippet.min.js
cp -f src/ts/thinkingdata.min.d.ts release/thinkingdata.cjs.min.d.ts
cp -f src/ts/thinkingdata.min.d.ts release/thinkingdata.esm.min.d.ts
cp -f src/ts/thinkingdata.min.d.ts release/thinkingdata.umd.min.d.ts
cp -f src/ts/thinkingdata.min.d.ts release/thinkingdata.min.d.ts
pushd release;
# zip ThinkingDataJSLib_V${npm_package_version}.zip *.min.js;
zip ta_js_sdk_${npm_package_version}.zip *.min.*;
zip ta_js_sdk.zip *.min.*;
mkdir -p npm_js
cp -f thinkingdata.umd.min.js npm_js/thinkingdata.umd.min.js
cp -f thinkingdata.umd.min.d.ts npm_js/thinkingdata.umd.min.d.ts
cat>npm_js/package.json<<EOF
{
"name": "thinkingdata-browser",
"version": "${npm_package_version}",
"description": "The official ThinkingData JavaScript browser client library",
"main": "thinkingdata.umd.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"js",
"data"
],
"author": "thingkingdata",
"license": "Apache-2.0"
}
EOF
popd
uglifyjs build/thinkingdata.global.js -o ./example/thinkingdata.js