Skip to content
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

Merged
merged 2 commits into from
Jul 22, 2020
Merged

feat/template-generator #14

merged 2 commits into from
Jul 22, 2020

Conversation

jw-foss
Copy link
Member

@jw-foss jw-foss commented Jul 22, 2020

  • Add gc.sh as template generator
  • Add gc as npm script to generate boilerplate

- Add `gc.sh` as template generator
- Add `gc` as npm script to generate boilerplate
@jw-foss jw-foss requested review from HerringtonDarkholme and iamkun and removed request for HerringtonDarkholme and iamkun July 22, 2020 13:17
scripts/gc.sh Outdated
"
TEMPLATE_PKG_JSON="\n
{\n
\"name\": \"eleplus-${NAME}\",\n
Copy link
Collaborator

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

Copy link
Member Author

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
Copy link
Collaborator

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?

Copy link
Member Author

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
Copy link
Member Author

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

Copy link
Collaborator

@HerringtonDarkholme HerringtonDarkholme left a 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!

@jw-foss jw-foss merged commit 0c48388 into dev Jul 22, 2020
@jw-foss jw-foss deleted the feat/template-generator branch July 22, 2020 14:00
tikazyq added a commit to crawlab-team/crawlab-ui that referenced this pull request Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants