mirror of
https://github.com/primer/css.git
synced 2024-12-18 11:41:33 +03:00
25 lines
527 B
Bash
Executable File
25 lines
527 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
function generate() {
|
|
pushd modules > /dev/null
|
|
../node_modules/.bin/yo ../tools/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
|
|
|
|
generate "$@"
|
|
|
|
echo "✅ All set! Let me bootstrap that new module for ya..."
|
|
npm run bootstrap
|
|
fi
|