Misc: Move module template into seperate directory

pull/36/head
Marc 2021-05-10 17:09:37 +01:00
parent 502e99841f
commit d027f99e2d
No known key found for this signature in database
GPG Key ID: 0657563F705ACAAE
26 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,7 @@
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "examplemodule",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.11", "@angular/animations": "~9.1.11",

View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

View File

@ -39,15 +39,15 @@ sanitize_info() {
MODULE_NAME=${MODULE_NAME// /} MODULE_NAME=${MODULE_NAME// /}
} }
create_template() { create_from_template() {
if [[ ! -d "examplemodule" ]]; then if [[ ! -d "Misc/module-template" ]]; then
echo "[!!] The template module seems to be missing. Please re-clone this repository and try again." echo "[!!] The template module seems to be missing. Please re-clone this repository and try again."
exit 1 exit 1
fi fi
echo "[*] Creating New Module ($MODULE_NAME)." echo "[*] Creating New Module ($MODULE_NAME)."
cp -r examplemodule $MODULE_NAME cp -r Misc/module-template $MODULE_NAME
grep -rl examplemodule $MODULE_NAME/ | xargs sed -i "s/examplemodule/$MODULE_NAME/g" grep -rl examplemodule $MODULE_NAME/ | xargs sed -i "s/examplemodule/$MODULE_NAME/g"
grep -rl example-module $MODULE_NAME/ | xargs sed -i "s/example-module/$MODULE_NAME/g" grep -rl example-module $MODULE_NAME/ | xargs sed -i "s/example-module/$MODULE_NAME/g"
@ -101,7 +101,7 @@ finish() {
main() { main() {
print_banner print_banner
get_info get_info
create_template create_from_template
ask_prepare_node ask_prepare_node
finish finish