This repository was archived by the owner on May 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,19 @@ build(){
5959 ok=$?
6060 sed -i ' s|.*nonlocal .*||g' dist/xrfragment.py
6161 ls -lah dist/*
62+ exit
6263 echo -e " [OK] parser build\n"
6364 }
6465
6566 js (){
66- # prepend license to vanilla lib
67- # echo "// https://xrfragment.org\n// SPDX-License-Identifier: MPL-2.0\n$(cat dist/xrfragment.js)" > dist/xrfragment.js
67+ license_js=" /*"
68+ license_js=" ${license_js} \n * generated at $( date) "
69+ license_js=" ${license_js} \n * https://xrfragment.org"
70+ license_js=" ${license_js} \n * SPDX-License-Identifier: MPL-2.0"
71+ license_js=" ${license_js} \n */\n"
72+
6873 # add js module
69- cat dist/xrfragment.js > dist/xrfragment.module.js
74+ cat dist/xrfragment.js > > dist/xrfragment.module.js
7075 echo " export default xrfragment;" >> dist/xrfragment.module.js
7176 # add THREE
7277 cat dist/xrfragment.js \
@@ -85,6 +90,8 @@ build(){
8590 src/3rd/js/aframe/* .js > dist/xrfragment.aframe.js
8691 # convert ESM to normal browser js
8792 sed ' s/export //g' example/assets/js/utils.js > dist/utils.js
93+ # add license headers
94+ for i in dist/* .js; do echo -e " ${license_js} $( cat $i ) " > $i ; done
8895 ls -la dist | grep js
8996 exit $ok
9097 }
You can’t perform that action at this time.
0 commit comments