mirror of
https://github.com/primer/css.git
synced 2024-11-28 22:01:43 +03:00
short-circuit other stuff for --help
This commit is contained in:
parent
1b3b14b459
commit
4128fd2de0
@ -1,16 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo
|
||||
echo "📦 Creating a new module..."
|
||||
echo
|
||||
echo " Protip: you can pass --force to skip the Yeoman conflict prompts."
|
||||
echo " Otherwise, press 'y' for each one or 'a' for the first."
|
||||
echo
|
||||
function generate() {
|
||||
pushd modules > /dev/null
|
||||
../node_modules/.bin/yo ./generator-primer-module/app "$@"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
pushd modules > /dev/null
|
||||
../node_modules/.bin/yo ./generator-primer-module/app "$@"
|
||||
popd > /dev/null
|
||||
if [[ "$@" == "--help" ]]; then
|
||||
generate "$@"
|
||||
else
|
||||
echo
|
||||
echo "📦 Creating a new module..."
|
||||
echo
|
||||
echo " Protip: you can pass --force to skip the Yeoman conflict prompts."
|
||||
echo " Otherwise, press 'y' for each one or 'a' for the first."
|
||||
echo
|
||||
|
||||
echo "✅ All set! Let me bootstrap that new module for ya..."
|
||||
npm run bootstrap
|
||||
generate "$@"
|
||||
|
||||
echo "✅ All set! Let me bootstrap that new module for ya..."
|
||||
npm run bootstrap
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user