#!/bin/sh
#dtsmake --src ../assets/Plugin/NotificationCenter.js --dist ./NotificationCenter.d.ts

for file in `ls ./dts`
do   
  rm -rf ./dts/${file}                       
done  

jsDir="../assets/Plugin";

files=$(ls ${jsDir} | grep '.*js$')
for filename in $files
do
 echo $filename 
 nameLength=${#filename}
 nameLength=`expr ${nameLength} - 3`
 outputName=${filename:0:${nameLength}}
 outputName=${outputName}
 dtsmake --src ../assets/Plugin/${filename} --dist ./dts/${outputName}
done