25 lines
383 B
Bash
Executable file
25 lines
383 B
Bash
Executable file
#!/bin/sh
|
|
|
|
for arg in $@; do
|
|
mkdir ${arg}
|
|
|
|
component_name="Article$(echo ${arg} | sed -e 's/-\(.\)/\U\1/g;s/^\(.\)/\U\1/;s/-//g')"
|
|
|
|
cat > "${arg}/page.tsx" <<EOF
|
|
import Article from "@/components/Article";
|
|
|
|
const ${component_name} = () => {
|
|
return (
|
|
<Article
|
|
title=""
|
|
author=""
|
|
>
|
|
|
|
</Article>
|
|
);
|
|
};
|
|
|
|
export default ${component_name};
|
|
EOF
|
|
|
|
done
|