Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100884445
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
Mon, Feb 3, 14:51
Size
522 B
Mime Type
text/x-shellscript
Expires
Wed, Feb 5, 14:51 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24048899
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