mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	修复编译脚本无法生成components.js的问题
This commit is contained in:
		@@ -2,6 +2,7 @@
 | 
			
		||||
 | 
			
		||||
function build() {
 | 
			
		||||
	ROOT=$(dirname $0)
 | 
			
		||||
	JS_ROOT=$ROOT/../web/public/js
 | 
			
		||||
	NAME="edge-admin"
 | 
			
		||||
	DIST=$ROOT/"../dist/${NAME}"
 | 
			
		||||
	OS=${1}
 | 
			
		||||
@@ -53,6 +54,13 @@ function build() {
 | 
			
		||||
    # generate files
 | 
			
		||||
    echo "generating files ..."
 | 
			
		||||
	go run -tags $TAG $ROOT/../cmd/edge-admin/main.go generate
 | 
			
		||||
	if [ `which uglifyjs` ]; then
 | 
			
		||||
    	echo "compress to component.js ..."
 | 
			
		||||
    	uglifyjs --compress --mangle -- ${JS_ROOT}/components.src.js > ${JS_ROOT}/components.js
 | 
			
		||||
    else
 | 
			
		||||
    	echo "copy to component.js ..."
 | 
			
		||||
    	cp ${JS_ROOT}/components.src.js ${JS_ROOT}/components.js
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
	# create dir & copy files
 | 
			
		||||
	echo "copying ..."
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user