-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/template-generator #14
Conversation
- Add `gc.sh` as template generator - Add `gc` as npm script to generate boilerplate
scripts/gc.sh
Outdated
" | ||
TEMPLATE_PKG_JSON="\n | ||
{\n | ||
\"name\": \"eleplus-${NAME}\",\n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should use @element-plus/name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
scripts/gc.sh
Outdated
@@ -0,0 +1,65 @@ | |||
#! /bin/bash | |||
|
|||
export NAME=$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need export here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, not at all.
fi | ||
|
||
DIRNAME="$FILE_PATH/$NAME" | ||
INPUT_NAME=$NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HerringtonDarkholme Added this line here to obtain the original name to fill into the package.json without camel casing the name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Cool shell-fu!
gc.sh
as template generatorgc
as npm script to generate boilerplate