@furry-boilerplates/command-line-interface 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
SCOPE.cli.gateway(){
|
|
2
|
+
local COMMAND="$1"
|
|
3
|
+
shift
|
|
4
|
+
|
|
5
|
+
local ARGS=("$@")
|
|
6
|
+
|
|
7
|
+
case $COMMAND in
|
|
8
|
+
helloworld)
|
|
9
|
+
SCOPE.helloworld "${ARGS[@]}";;
|
|
10
|
+
export)
|
|
11
|
+
echo "Exporting SCOPE includes ..."
|
|
12
|
+
SCOPE.include.scripts "includes.sh" "$@";;
|
|
13
|
+
*)
|
|
14
|
+
echo "Unknown command '${COMMAND}'";;
|
|
15
|
+
esac
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
__SCOPE_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
|
|
2
|
+
__SCOPE_CLI_PATH="$(realpath "$__SCOPE_BIN_PATH/..")"
|
|
3
|
+
__SCOPE_MODULES_PATH="${__SCOPE_BIN_PATH}/modules"
|
|
4
|
+
__SCOPE_INSTALL_DIR="$PWD"
|
|
5
|
+
__SCOPE_PACKAGE_PATH="$(realpath "$__SCOPE_BIN_PATH/..")"
|
|
6
|
+
|
|
7
|
+
SCOPE.include.scripts(){
|
|
8
|
+
local BASE="${__SCOPE_BIN_PATH}"
|
|
9
|
+
local SCRIPTS=()
|
|
10
|
+
|
|
11
|
+
while [[ $# -gt 0 ]]; do
|
|
12
|
+
case $1 in
|
|
13
|
+
--base) BASE="$2"; shift 2 ;;
|
|
14
|
+
*) SCRIPTS+=("$1"); shift 1 ;;
|
|
15
|
+
esac
|
|
16
|
+
done
|
|
17
|
+
echo "INCLUDE SCRIPT: ${SCRIPT}"
|
|
18
|
+
for SCRIPT in "${SCRIPTS[@]}"; do
|
|
19
|
+
. "${BASE}/${SCRIPT}"
|
|
20
|
+
done
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
SCOPE.include.scripts \
|
|
24
|
+
"gateway.sh" \
|
|
25
|
+
"tests/includes.sh"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furry-boilerplates/command-line-interface",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "To make it easy for you to get started with GitLab, here's a list of recommended next steps.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://gitlab.com/furry-installers/boilerplates/command-line-interface#readme",
|
|
18
18
|
"files": [
|
|
19
|
-
"bin/"
|
|
19
|
+
"bin/",
|
|
20
|
+
"dist/"
|
|
20
21
|
],
|
|
21
22
|
"bin": {
|
|
22
|
-
"
|
|
23
|
+
"cli-installer": "bin/entry"
|
|
23
24
|
}
|
|
24
25
|
}
|
|
File without changes
|