This bash package will generate the Skeleton for the Resource Design Pattern.
Generating the Skeleton for a specific Programming Language is possible, providing that the target language can implement the Resource Design Pattern.
For more information on the Resource Design Pattern, please visit https://github.com/resource-design-pattern/concepts.
This package as dependencies on several other Bash Packages, therefore to require them we will use the Bash Package Manager.
If is installed yet in your system, please visit https://github.com/exadra37-bash/package-manager and follow the instructions.
# this path is for Ubuntu 14.04, may be necessary to adjust in other O.S.
> cd /usr/local/bin
# this must be run as root, therefore the use of `sudo`
>sudo git clone -b master --single-branch --depth 1 https://github.com/resource-design-pattern/skeleton-generator.git vendor/resource-design-pattern/skeleton-generator
> cd vendor/resource-design-pattern/skeleton-generator
# We must have already the Bash Package Manager installed to run the next command
> sudo bpm install
# for ZSH shell - IF YOU ARE NOT USING IT, YOU SHOULD ;)
> echo "alias skg=/usr/local/bin/vendor/resource-design-pattern/skeleton-generator/src/skeleton-generator.sh" >> ~/.zshrc && . ~/.zshrc
# for Bash shell
> echo "alias skg=/usr/local/bin/vendor/resource-design-pattern/skeleton-generator/src/skeleton-generator.sh" >> ~/.bashrc && . ~/.bashrc
We can invoke it like skg <vendor-name/package-name> <file-extension> <resources>
> mkdir -p tmp/demo && cd tmp/demo
# skg <vendor-name/package-name> <file-extension> <resources>
> skg skg exadra37/ecommerce php Clients,Categories,Products,Carts,Checkout
# lets check our main Skeleton
> ls -1
config
deploy
docs
public
src
tests
# skg <vendor-name/package-name> <file-extension> <resources> -p <path/to/generate/skeleton>
> skg exadra37/ecommerce php Clients,Categories,Products,Carts,Checkout -p vendor/exadra37/ecommerce
Several options are available for advanced usage, but in the moment they are not fully tested or implemented, therefore when ready the proper documentation will be added here.