Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
518 B

#!/bin/bash
set -eu
files=$(ls ./src/_*.js | xargs -I "{}" basename {} .js)
lines=$(echo $files | tr " " "\n")
content='';
for src in $lines; do
name=$(echo $src | perl -pe 's/(^|_)./uc($&)/ge;s/_//g')
if [ $name = "classNameTdzError" ]; then
name='classNameTDZError';
fi
if [ $name = "typeof" ]; then
name='_typeof';
fi
if [ $name = "instanceof" ]; then
name='_instanceof';
fi
if [ $name = "throw" ]; then
name='_throw';
fi
echo "export { default as $name } from './$src';"
done