mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-11-09 17:06:13 -06:00
feat(scripts/new-pkg): create a new package in the monorepo
This commit is contained in:
21
scripts/new-pkg
Executable file
21
scripts/new-pkg
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
# move to the root repo dir
|
||||
cd "$(dirname "$(which "$0")")/.."
|
||||
|
||||
case "$1" in
|
||||
*/*)
|
||||
# already in a namespace
|
||||
pkgDir=$1
|
||||
;;
|
||||
*)
|
||||
pkgDir=packages/$1
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir "$pkgDir"
|
||||
echo '{}' > "$pkgDir/package.json"
|
||||
touch "$pkgDir/.USAGE.md"
|
||||
./scripts/normalize-packages.js
|
||||
Reference in New Issue
Block a user