Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102632203
generator.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 22, 17:30
Size
522 B
Mime Type
text/x-shellscript
Expires
Mon, Feb 24, 17:30 (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
24377611
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
generator.sh
View Options
#!/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.mjs';"
done
Event Timeline
Log In to Comment