@furry-boilerplates/capacitorjs 0.1.2 → 1.0.0
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.
- package/README.md +3 -3
- package/bin/capacitorjs +21 -0
- package/bin/gateway.sh +19 -0
- package/bin/includes.sh +25 -0
- package/bin/install/configure.git.sh +12 -0
- package/bin/install/configure.gradle.sh +11 -0
- package/bin/install/configure.npm.sh +35 -0
- package/bin/install/configure.template.sh +37 -0
- package/bin/install/import.scaffolding.sh +12 -0
- package/bin/install/includes.sh +13 -0
- package/bin/install/init.dist.sh +10 -0
- package/bin/install/install.android.sh +11 -0
- package/bin/install/install.capacitor.sh +13 -0
- package/bin/install/install.ios.sh +10 -0
- package/bin/install/install.npm.sh +38 -0
- package/bin/install/install.sh +108 -0
- package/bin/install/sync.capacitor.sh +9 -0
- package/bin/tests/helloworld.sh +5 -0
- package/bin/tests/includes.sh +2 -0
- package/dist/BUGS.md +14 -0
- package/dist/LICENSE.md +11 -0
- package/dist/README.md +14 -0
- package/dist/bin/build/build.sh +6 -0
- package/dist/bin/build/capacitor.sync.sh +5 -0
- package/dist/bin/build/includes.sh +4 -0
- package/dist/bin/build/rollup.sh +8 -0
- package/dist/bin/cli/gateway.sh +24 -0
- package/dist/bin/cli/includes.sh +2 -0
- package/dist/bin/furrycap/furrycap +21 -0
- package/dist/bin/furrycap/gateway.sh +17 -0
- package/dist/bin/furrycap/includes.sh +24 -0
- package/dist/bin/furrycap/tests/helloworld.sh +5 -0
- package/dist/bin/furrycap/tests/includes.sh +2 -0
- package/dist/bin/furrycapOLD +17 -0
- package/dist/bin/includes.sh +5 -0
- package/dist/bin/launch/gateway.sh +22 -0
- package/dist/bin/launch/includes.sh +5 -0
- package/dist/bin/launch/launch.android.sh +3 -0
- package/dist/bin/launch/launch.ios.sh +3 -0
- package/dist/bin/launch/launch.web.sh +21 -0
- package/dist/capacitor.config.json +3 -0
- package/dist/dotenv +1 -0
- package/{index.mjs → dist/index.mjs} +1 -4
- package/dist/nodemon.json +8 -0
- package/dist/package.json +35 -0
- package/package.json +9 -14
- package/nodemon.json +0 -7
- /package/{rollup.config.mjs → dist/rollup.config.mjs} +0 -0
- /package/{www → dist/www}/src/index.html +0 -0
- /package/{www → dist/www}/src/index.mjs +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Capacitor JS
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -15,14 +15,14 @@ Already a pro? Just edit this README.md and make it your own. Want to make it ea
|
|
|
15
15
|
|
|
16
16
|
```
|
|
17
17
|
cd existing_repo
|
|
18
|
-
git remote add origin https://gitlab.com/furry-installers/boilerplates/
|
|
18
|
+
git remote add origin https://gitlab.com/furry-installers/boilerplates/capacitor-js.git
|
|
19
19
|
git branch -M main
|
|
20
20
|
git push -uf origin main
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Integrate with your tools
|
|
24
24
|
|
|
25
|
-
* [Set up project integrations](https://gitlab.com/furry-installers/boilerplates/
|
|
25
|
+
* [Set up project integrations](https://gitlab.com/furry-installers/boilerplates/capacitor-js/-/settings/integrations)
|
|
26
26
|
|
|
27
27
|
## Collaborate with your team
|
|
28
28
|
|
package/bin/capacitorjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#! /bin/bash
|
|
2
|
+
__capacitorjs_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
|
|
3
|
+
__capacitorjs_INSTALL_DIR="$PWD"
|
|
4
|
+
|
|
5
|
+
. "${__capacitorjs_BIN_PATH}/includes.sh"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
__capacitorjs_CLI_PATH="${__capacitorjs_INSTALL_DIR}/node_modules/@furrymink/cli"
|
|
9
|
+
|
|
10
|
+
if [[ ! -d "$__capacitorjs_CLI_PATH" ]]; then
|
|
11
|
+
echo "@furrymink/cli not found. installing now..."
|
|
12
|
+
npm install @furrymink/cli@latest
|
|
13
|
+
else
|
|
14
|
+
echo "@furrymink/cli already installed"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
source "${__capacitorjs_INSTALL_DIR}/node_modules/@furrymink/cli/bin/includes.sh"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
capacitorjs.cli.gateway "$@"
|
package/bin/gateway.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
capacitorjs.cli.gateway(){
|
|
2
|
+
local COMMAND="$1"
|
|
3
|
+
shift
|
|
4
|
+
|
|
5
|
+
local ARGS=("$@")
|
|
6
|
+
|
|
7
|
+
case $COMMAND in
|
|
8
|
+
helloworld)
|
|
9
|
+
capacitorjs.helloworld "${ARGS[@]}";;
|
|
10
|
+
install)
|
|
11
|
+
capacitorjs.install "${ARGS[@]}";;
|
|
12
|
+
export)
|
|
13
|
+
console.info "Exporting capacitorjs includes ..."
|
|
14
|
+
capacitorjs.include.scripts "includes.sh" "$@";;
|
|
15
|
+
*)
|
|
16
|
+
console.info "Unknown command '${COMMAND}'";;
|
|
17
|
+
esac
|
|
18
|
+
|
|
19
|
+
}
|
package/bin/includes.sh
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
__capacitorjs_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
|
|
2
|
+
__capacitorjs_CLI_PATH="$(realpath "$__capacitorjs_BIN_PATH/..")"
|
|
3
|
+
__capacitorjs_MODULES_PATH="${__capacitorjs_BIN_PATH}/modules"
|
|
4
|
+
__capacitorjs_INSTALL_DIR="$PWD"
|
|
5
|
+
__capacitorjs_PACKAGE_PATH="$(realpath "$__capacitorjs_BIN_PATH/..")"
|
|
6
|
+
|
|
7
|
+
capacitorjs.include.scripts(){
|
|
8
|
+
local BASE="${__capacitorjs_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
|
+
for SCRIPT in "${SCRIPTS[@]}"; do
|
|
18
|
+
. "${BASE}/${SCRIPT}"
|
|
19
|
+
done
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
capacitorjs.include.scripts \
|
|
23
|
+
"gateway.sh" \
|
|
24
|
+
"tests/includes.sh" \
|
|
25
|
+
"install/includes.sh"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
capacitorjs.configure.gradle(){
|
|
2
|
+
console.header "Configure gradle"
|
|
3
|
+
local INSTALL_DIR="$1"
|
|
4
|
+
|
|
5
|
+
cd $INSTALL_DIR
|
|
6
|
+
|
|
7
|
+
sed -i 's#^distributionUrl=.*#distributionUrl=https\\://services.gradle.org/distributions/gradle-9.1.0-bin.zip#' "${INSTALL_DIR}/android/gradle/wrapper/gradle-wrapper.properties"
|
|
8
|
+
sed -i "s/proguard-android\.txt/proguard-android-optimize.txt/g" "${INSTALL_DIR}/android/app/build.gradle"
|
|
9
|
+
sed -i "s/com.android.tools.build:gradle:8.13.0/com.android.tools.build:gradle:9.0.1/g" "${INSTALL_DIR}/android/build.gradle"
|
|
10
|
+
console.info "Finished configuring gradle"
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
capacitorjs.configure.npm(){
|
|
2
|
+
console.header "Configure NPM"
|
|
3
|
+
local INSTALL_DIR="$1"
|
|
4
|
+
local APP_NAME="$2"
|
|
5
|
+
local VERSION="$3"
|
|
6
|
+
local TYPE="$4"
|
|
7
|
+
local REPO_URL="$5"
|
|
8
|
+
local BUGS_URL="$6"
|
|
9
|
+
local HOMEPAGE_URL="$7"
|
|
10
|
+
local LICENSE="$8"
|
|
11
|
+
|
|
12
|
+
cd $INSTALL_DIR
|
|
13
|
+
|
|
14
|
+
console.log "Update package.json"
|
|
15
|
+
npm pkg set name="${APP_NAME}"
|
|
16
|
+
npm pkg set type="${TYPE}"
|
|
17
|
+
npm pkg set main="index.mjs"
|
|
18
|
+
npm pkg set repository.url="${REPO_URL}"
|
|
19
|
+
npm pkg set bugs.url="${BUGS_URL}"
|
|
20
|
+
npm pkg set homepage="${HOMEPAGE_URL}"
|
|
21
|
+
npm pkg set scripts.build="./scripts/build.sh"
|
|
22
|
+
npm pkg set scripts.launch:web="./scripts/launch-web.sh"
|
|
23
|
+
npm pkg set scripts.launch:android="./scripts/launch-android.sh"
|
|
24
|
+
npm pkg set scripts.launch:ios="./scripts/launch-ios.sh"
|
|
25
|
+
npm pkg set scripts.git:push="./scripts/git-push.sh"
|
|
26
|
+
npm pkg set scripts.git:commit="./scripts/git-commit.sh"
|
|
27
|
+
npm pkg set scripts.open:studio:push="npx cap open android"
|
|
28
|
+
|
|
29
|
+
if [[ -z "${LICENSE//[[:space:]]/}" ]]; then
|
|
30
|
+
npm pkg delete license
|
|
31
|
+
else
|
|
32
|
+
npm pkg set license="${LICENSE}"
|
|
33
|
+
fi
|
|
34
|
+
console.info "Finished configuring NPM"
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
capacitorjs.configure.template(){
|
|
2
|
+
console.header "Configure template"
|
|
3
|
+
# DEV NOTE SHOULD PASS A LIST OF KEY PAIR VALUES TO REPLACE IN INDEX
|
|
4
|
+
|
|
5
|
+
local INSTALL_DIR="$1"
|
|
6
|
+
local APP_NAME="$2"
|
|
7
|
+
local DESCRIPTION="$3"
|
|
8
|
+
local AUTHOR="$4"
|
|
9
|
+
local EMAIL="$5"
|
|
10
|
+
local LICENSE="$6"
|
|
11
|
+
local LICENSE_NOTICE="${LICENSE:-$__boilerplate_strings__no_license_granted}"
|
|
12
|
+
|
|
13
|
+
cd $INSTALL_DIR
|
|
14
|
+
|
|
15
|
+
if [[ $LICENSE != "" ]]; then
|
|
16
|
+
rm "LICENSE.md"
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
local ESCAPED_NOTICE=$(printf '%s' "$LICENSE_NOTICE" | sed 's/[&/\]/\\&/g; s/$/\\n/' | tr -d '\n')
|
|
20
|
+
|
|
21
|
+
console.log "Configuring web resources"
|
|
22
|
+
sed -i "s/{{APP_NAME}}/$APP_NAME/" "${INSTALL_DIR}/www/src/index.html"
|
|
23
|
+
|
|
24
|
+
sed -i "s/{{APP_NAME}}/$APP_NAME/" "${INSTALL_DIR}/README.md"
|
|
25
|
+
sed -i "s/{{DESCRIPTION}}/$DESCRIPTION/" "${INSTALL_DIR}/README.md"
|
|
26
|
+
sed -i "s/{{AUTHOR}}/$AUTHOR/" "${INSTALL_DIR}/README.md"
|
|
27
|
+
sed -i "s/{{EMAIL}}/$EMAIL/" "${INSTALL_DIR}/README.md"
|
|
28
|
+
sed -i "s/{{LICENSE}}/$ESCAPED_NOTICE/g" "${INSTALL_DIR}/README.md"
|
|
29
|
+
|
|
30
|
+
sed -i "s/{{APP_NAME}}/$APP_NAME/" "${INSTALL_DIR}/BUGS.md"
|
|
31
|
+
sed -i "s/{{DESCRIPTION}}/$DESCRIPTION/" "${INSTALL_DIR}/BUGS.md"
|
|
32
|
+
sed -i "s/{{AUTHOR}}/$AUTHOR/" "${INSTALL_DIR}/BUGS.md"
|
|
33
|
+
sed -i "s/{{EMAIL}}/$EMAIL/" "${INSTALL_DIR}/BUGS.md"
|
|
34
|
+
sed -i "s/{{LICENSE}}/$ESCAPED_NOTICE/g" "${INSTALL_DIR}/BUGS.md"
|
|
35
|
+
|
|
36
|
+
console.info "Finished configuring template"
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
capacitorjs.import.scaffolding(){
|
|
2
|
+
console.header "Import scaffolding"
|
|
3
|
+
|
|
4
|
+
local INSTALL_DIR="$1"
|
|
5
|
+
local PACKAGE_PATH="$2"
|
|
6
|
+
|
|
7
|
+
cd $INSTALL_DIR
|
|
8
|
+
|
|
9
|
+
cp -rf "${PACKAGE_PATH}/dist/." "${INSTALL_DIR}/"
|
|
10
|
+
mv "${INSTALL_DIR}/dotenv" "${INSTALL_DIR}/.env"
|
|
11
|
+
console.info "Finished importing scaffolding"
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
capacitorjs.include.scripts \
|
|
2
|
+
"install/configure.git.sh" \
|
|
3
|
+
"install/configure.gradle.sh" \
|
|
4
|
+
"install/configure.npm.sh" \
|
|
5
|
+
"install/configure.template.sh" \
|
|
6
|
+
"install/import.scaffolding.sh" \
|
|
7
|
+
"install/init.dist.sh" \
|
|
8
|
+
"install/install.sh" \
|
|
9
|
+
"install/install.android.sh" \
|
|
10
|
+
"install/install.capacitor.sh" \
|
|
11
|
+
"install/install.ios.sh" \
|
|
12
|
+
"install/install.npm.sh" \
|
|
13
|
+
"install/sync.capacitor.sh"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
capacitorjs.install.capacitor(){
|
|
2
|
+
console.header "Install capacitor"
|
|
3
|
+
local INSTALL_DIR="$1"
|
|
4
|
+
local _APP_NAME="$2"
|
|
5
|
+
local _PACKAGE_ID="$3"
|
|
6
|
+
|
|
7
|
+
cd "${INSTALL_DIR}"
|
|
8
|
+
|
|
9
|
+
console.info "npx cap init ${_APP_NAME} ${_PACKAGE_ID} --web-dir www/dist"
|
|
10
|
+
npx cap init "${_APP_NAME}" "${_PACKAGE_ID}" --web-dir "www/dist"
|
|
11
|
+
|
|
12
|
+
console.info "Finished installing capacitor"
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
capacitorjs.install.npm(){
|
|
2
|
+
console.header "Install NPM"
|
|
3
|
+
|
|
4
|
+
local INSTALL_DIR="$1"
|
|
5
|
+
local _APP_NAME="$2"
|
|
6
|
+
local _TYPE="$3"
|
|
7
|
+
local _REPO_URL="$4"
|
|
8
|
+
local _BUGS_URL="$5"
|
|
9
|
+
local _HOMEPAGE_URL="$6"
|
|
10
|
+
local _LICENSE="$7"
|
|
11
|
+
|
|
12
|
+
cd "${INSTALL_DIR}"
|
|
13
|
+
|
|
14
|
+
npm install
|
|
15
|
+
|
|
16
|
+
console.info "Configure package.json"
|
|
17
|
+
|
|
18
|
+
npm pkg set name="${_APP_NAME}"
|
|
19
|
+
npm pkg set type="${_TYPE}"
|
|
20
|
+
npm pkg set main="index.mjs"
|
|
21
|
+
npm pkg set repository.url="${_REPO_URL}"
|
|
22
|
+
npm pkg set bugs.url="${_BUGS_URL}"
|
|
23
|
+
npm pkg set homepage="${_HOMEPAGE_URL}"
|
|
24
|
+
npm pkg set scripts.build="./scripts/build.sh"
|
|
25
|
+
npm pkg set scripts.launch:web="./scripts/launch-web.sh"
|
|
26
|
+
npm pkg set scripts.launch:android="./scripts/launch-android.sh"
|
|
27
|
+
npm pkg set scripts.launch:ios="./scripts/launch-ios.sh"
|
|
28
|
+
npm pkg set scripts.git:push="./scripts/git-push.sh"
|
|
29
|
+
npm pkg set scripts.git:commit="./scripts/git-commit.sh"
|
|
30
|
+
npm pkg set scripts.open:studio:push="npx cap open android"
|
|
31
|
+
|
|
32
|
+
if [[ -z "${LICENSE//[[:space:]]/}" ]]; then
|
|
33
|
+
npm pkg delete license
|
|
34
|
+
else
|
|
35
|
+
npm pkg set license="${LICENSE}"
|
|
36
|
+
fi
|
|
37
|
+
console.info "Finished installing NPM"
|
|
38
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
capacitorjs.install(){
|
|
2
|
+
console.header "Questionnaire"
|
|
3
|
+
|
|
4
|
+
local _INSTALL_DIR="$__capacitorjs_INSTALL_DIR"
|
|
5
|
+
local _PACKAGE_PATH="$__capacitorjs_PACKAGE_PATH"
|
|
6
|
+
|
|
7
|
+
local ARGS=("$@")
|
|
8
|
+
local _BASE_REPO_URL="furrymink"
|
|
9
|
+
local _DEFAULT_BRANCH="main"
|
|
10
|
+
local _DEFAULT_LICENSE=""
|
|
11
|
+
local _DEFAULT_AUTHOR="Lee"
|
|
12
|
+
local _DEFAULT_DEV_BROWSER_PORT="3000"
|
|
13
|
+
local _DEFAULT_EMAIL="lee@bowyer.fr"
|
|
14
|
+
|
|
15
|
+
local _APP_NAME=$(get.app-name "my-app")
|
|
16
|
+
local _NORMALISED_APP_NAME=$(normalise.package-id $_APP_NAME)
|
|
17
|
+
local _GIT_BASE_URL="${_BASE_REPO_URL}/${_NORMALISED_APP_NAME}"
|
|
18
|
+
|
|
19
|
+
local _PACKAGE_ID=$(get.package-id $_BASE_REPO_URL $_APP_NAME)
|
|
20
|
+
local _HOMEPAGE_URL=$(get.home-page-url "$_GIT_BASE_URL")
|
|
21
|
+
local _REPO_URL=$(get.repo-url "$_GIT_BASE_URL")
|
|
22
|
+
local _BRANCH=$(get.repo-branch "$_DEFAULT_BRANCH")
|
|
23
|
+
local _README_URL=$(get.read-me-url "$_GIT_BASE_URL")
|
|
24
|
+
local _BUGS_URL=$(get.bugs-url "$_GIT_BASE_URL")
|
|
25
|
+
local _LICENSE=$(get.license "$_DEFAULT_LICENSE")
|
|
26
|
+
local _AUTHOR=$(get.author "$_DEFAULT_AUTHOR")
|
|
27
|
+
local _EMAIL=$(get.email "$_DEFAULT_EMAIL")
|
|
28
|
+
local _DESCRIPTION=$(get.description "Give a short description of what $_APP_NAME does")
|
|
29
|
+
local _DEV_BROWSER_PORT=$(get.broswer-port "$_DEFAULT_DEV_BROWSER_PORT")
|
|
30
|
+
local _TYPE=$(get.type)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
capacitorjs.import.scaffolding \
|
|
34
|
+
"${_INSTALL_DIR}" \
|
|
35
|
+
"${_PACKAGE_PATH}"
|
|
36
|
+
|
|
37
|
+
capacitorjs.install.npm \
|
|
38
|
+
"${_INSTALL_DIR}" \
|
|
39
|
+
"${_APP_NAME}" \
|
|
40
|
+
"${_TYPE}" \
|
|
41
|
+
"${_REPO_URL}" \
|
|
42
|
+
"${_BUGS_URL}" \
|
|
43
|
+
"${_HOMEPAGE_URL}" \
|
|
44
|
+
"${_LICENSE}"
|
|
45
|
+
|
|
46
|
+
capacitorjs.install.capacitor \
|
|
47
|
+
"${_INSTALL_DIR}" \
|
|
48
|
+
"${_APP_NAME}" \
|
|
49
|
+
"${_PACKAGE_ID}"
|
|
50
|
+
|
|
51
|
+
capacitorjs.configure.template \
|
|
52
|
+
"$_INSTALL_DIR" \
|
|
53
|
+
"$_APP_NAME" \
|
|
54
|
+
"$_DESCRIPTION" \
|
|
55
|
+
"$_AUTHOR" \
|
|
56
|
+
"$_EMAIL" \
|
|
57
|
+
"$_LICENSE"
|
|
58
|
+
|
|
59
|
+
capacitorjs.init.dist \
|
|
60
|
+
"$_INSTALL_DIR"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
local _TARGET_PLATFORM=$(
|
|
64
|
+
input.select "Select OS" \
|
|
65
|
+
--prefill "1" \
|
|
66
|
+
--options "Android|iOS|Both"
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
case $_TARGET_PLATFORM in
|
|
70
|
+
"Android")
|
|
71
|
+
capacitorjs.install.android \
|
|
72
|
+
"$_INSTALL_DIR"
|
|
73
|
+
;;
|
|
74
|
+
"iOS")
|
|
75
|
+
capacitorjs.install.ios \
|
|
76
|
+
"$_INSTALL_DIR"
|
|
77
|
+
;;
|
|
78
|
+
"Both")
|
|
79
|
+
capacitorjs.install.android \
|
|
80
|
+
"$_INSTALL_DIR"
|
|
81
|
+
capacitorjs.install.ios \
|
|
82
|
+
"$_INSTALL_DIR"
|
|
83
|
+
;;
|
|
84
|
+
esac
|
|
85
|
+
|
|
86
|
+
capacitorjs.configure.gradle \
|
|
87
|
+
"$_INSTALL_DIR"
|
|
88
|
+
|
|
89
|
+
capacitorjs.configure.npm \
|
|
90
|
+
"$_INSTALL_DIR" \
|
|
91
|
+
"$_APP_NAME" \
|
|
92
|
+
"$_VERSION" \
|
|
93
|
+
"$_TYPE" \
|
|
94
|
+
"$_REPO_URL" \
|
|
95
|
+
"$_BUGS_URL" \
|
|
96
|
+
"$_HOMEPAGE_URL" \
|
|
97
|
+
"$_LICENSE"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
capacitorjs.sync.capacitor \
|
|
101
|
+
"$_INSTALL_DIR"
|
|
102
|
+
|
|
103
|
+
capacitorjs.configure.git \
|
|
104
|
+
"$_REPO_URL" \
|
|
105
|
+
"$_BRANCH" \
|
|
106
|
+
|
|
107
|
+
console.log "All done. Have a nice day"
|
|
108
|
+
}
|
package/dist/BUGS.md
ADDED
package/dist/LICENSE.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SOURCE AVAILABILITY NOTICE
|
|
2
|
+
|
|
3
|
+
This repository is publicly accessible for the purposes of transparency, technical inspection and peer review.
|
|
4
|
+
|
|
5
|
+
No licence is granted or implied. All rights are reserved by the author.
|
|
6
|
+
|
|
7
|
+
Unless expressly authorised in writing, you may not copy, modify, distribute, publish, sublicense or use this code, in whole or in part.
|
|
8
|
+
|
|
9
|
+
Public access to this repository does not constitute permission to reuse its contents.
|
|
10
|
+
|
|
11
|
+
The source code is made available so that others can inspect and evaluate the implementation, not to grant rights of use.
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
furry.cli.gateway(){
|
|
2
|
+
local COMMAND="$1"
|
|
3
|
+
shift
|
|
4
|
+
|
|
5
|
+
local ARGS=("$@")
|
|
6
|
+
|
|
7
|
+
case $COMMAND in
|
|
8
|
+
build)
|
|
9
|
+
furry.build;;
|
|
10
|
+
sync)
|
|
11
|
+
furry.sync.capacitor;;
|
|
12
|
+
rollup)
|
|
13
|
+
furry.rollup;;
|
|
14
|
+
launch)
|
|
15
|
+
furry.launch.gateway "$@";;
|
|
16
|
+
versioncontrol)
|
|
17
|
+
echo "VERSION CONTROL";;
|
|
18
|
+
open)
|
|
19
|
+
echo "OPEN";;
|
|
20
|
+
*)
|
|
21
|
+
console.error "Unknown command '${COMMAND}'";;
|
|
22
|
+
esac
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#! /bin/bash
|
|
2
|
+
__furrycap_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
|
|
3
|
+
__furrycap_INSTALL_DIR="$PWD"
|
|
4
|
+
|
|
5
|
+
. "${__furrycap_BIN_PATH}/includes.sh"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
__furrycap_CLI_PATH="${__furrycap_INSTALL_DIR}/node_modules/@furrymink/cli"
|
|
9
|
+
|
|
10
|
+
if [[ ! -d "$__furrycap_CLI_PATH" ]]; then
|
|
11
|
+
echo "@furrymink/cli not found. installing now..."
|
|
12
|
+
npm install @furrymink/cli@latest
|
|
13
|
+
else
|
|
14
|
+
echo "@furrymink/cli already installed"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
source "${__furrycap_INSTALL_DIR}/node_modules/@furrymink/cli/bin/includes.sh"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
furrycap.cli.gateway "$@"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
furrycap.cli.gateway(){
|
|
2
|
+
local COMMAND="$1"
|
|
3
|
+
shift
|
|
4
|
+
|
|
5
|
+
local ARGS=("$@")
|
|
6
|
+
|
|
7
|
+
case $COMMAND in
|
|
8
|
+
helloworld)
|
|
9
|
+
furrycap.helloworld "${ARGS[@]}";;
|
|
10
|
+
export)
|
|
11
|
+
console.info "Exporting furrycap includes ..."
|
|
12
|
+
furrycap.include.scripts "includes.sh" "$@";;
|
|
13
|
+
*)
|
|
14
|
+
console.info "Unknown command '${COMMAND}'";;
|
|
15
|
+
esac
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
__furrycap_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
|
|
2
|
+
__furrycap_CLI_PATH="$(realpath "$__furrycap_BIN_PATH/..")"
|
|
3
|
+
__furrycap_MODULES_PATH="${__furrycap_BIN_PATH}/modules"
|
|
4
|
+
__furrycap_INSTALL_DIR="$PWD"
|
|
5
|
+
__furrycap_PACKAGE_PATH="$(realpath "$__furrycap_BIN_PATH/..")"
|
|
6
|
+
|
|
7
|
+
furrycap.include.scripts(){
|
|
8
|
+
local BASE="${__furrycap_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
|
+
for SCRIPT in "${SCRIPTS[@]}"; do
|
|
18
|
+
. "${BASE}/${SCRIPT}"
|
|
19
|
+
done
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
furrycap.include.scripts \
|
|
23
|
+
"gateway.sh" \
|
|
24
|
+
"tests/includes.sh"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#! /bin/bash
|
|
2
|
+
__FURRYCAP_BIN_PATH="$(cd -- "$(dirname -- "$(realpath -- "${BASH_SOURCE[0]}")")" && pwd)"
|
|
3
|
+
__FURRYCAP_CLI_PATH="$(realpath "$__FURRYCAP_BIN_PATH/..")"
|
|
4
|
+
__FURRYCAP_MODULES_PATH="${__FURRYCAP_BIN_PATH}/modules"
|
|
5
|
+
__FURRYCAP_INSTALL_DIR="$PWD"
|
|
6
|
+
__FURRYCAP_PACKAGE_PATH="$(realpath "$__FURRYCAP_BIN_PATH/..")"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
source "${__FURRYCAP_INSTALL_DIR}/node_modules/@furrymink/cli/bin/includes.sh"
|
|
10
|
+
|
|
11
|
+
## WHIY NOT IN INSTALLER SCRIPT ?
|
|
12
|
+
import.dot-env
|
|
13
|
+
|
|
14
|
+
include.scripts --base "${__FURRYCAP_BIN_PATH}" \
|
|
15
|
+
"includes.sh"
|
|
16
|
+
|
|
17
|
+
furry.cli.gateway "$@"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
furry.launch.gateway(){
|
|
2
|
+
local COMMAND="$1"
|
|
3
|
+
shift
|
|
4
|
+
|
|
5
|
+
local ARGS=("$@")
|
|
6
|
+
|
|
7
|
+
case $COMMAND in
|
|
8
|
+
web)
|
|
9
|
+
furry.launch.web;;
|
|
10
|
+
android)
|
|
11
|
+
furry.launch.android;;
|
|
12
|
+
ios)
|
|
13
|
+
furry.launch.ios;;
|
|
14
|
+
all)
|
|
15
|
+
furry.launch.web
|
|
16
|
+
furry.launch.android
|
|
17
|
+
furry.launch.ios;;
|
|
18
|
+
*)
|
|
19
|
+
console.error "Unknown command '${COMMAND}'";;
|
|
20
|
+
esac
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
furry.launch.web(){
|
|
2
|
+
console.info "Building project"
|
|
3
|
+
npx furry build
|
|
4
|
+
|
|
5
|
+
console.info "Kill active node port on 3000"
|
|
6
|
+
console.warn "The port should be the same as the port for this project otherwise it will kill other apps"
|
|
7
|
+
PID=$(lsof -tiTCP:"$PORT" -sTCP:LISTEN)
|
|
8
|
+
|
|
9
|
+
if [ -n "$PID" ]; then
|
|
10
|
+
console.warn "KILL: ${PID}"
|
|
11
|
+
kill "$PID"
|
|
12
|
+
|
|
13
|
+
while lsof -tiTCP:"$PORT" -sTCP:LISTEN >/dev/null 2>&1; do
|
|
14
|
+
sleep 0.1
|
|
15
|
+
done
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# console.info "Start node"
|
|
19
|
+
nodemon "$@"
|
|
20
|
+
|
|
21
|
+
}
|
package/dist/dotenv
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PORT=3000
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "To make it easy for you to get started with GitLab, here's a list of recommended next steps.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+ssh://git@gitlab.com/furry-installers/boilerplates/capacitorjs.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "",
|
|
16
|
+
"type": "commonjs",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": ""
|
|
19
|
+
},
|
|
20
|
+
"homepage": "",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@capacitor/cli": "^8.6.0",
|
|
23
|
+
"@capacitor/core": "^8.6.0",
|
|
24
|
+
"@furrymink/cli": "latest",
|
|
25
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
26
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
27
|
+
"dotenv": "^18.0.9",
|
|
28
|
+
"express": "^5.3.0",
|
|
29
|
+
"nodemon": "^3.1.14",
|
|
30
|
+
"rollup": "^4.68.0"
|
|
31
|
+
},
|
|
32
|
+
"bin": {
|
|
33
|
+
"furrycap": "bin/furrycap/furrycap"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furry-boilerplates/capacitorjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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
|
"scripts": {
|
|
@@ -8,25 +8,20 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+ssh://git@gitlab.com/furry-installers/boilerplates/
|
|
11
|
+
"url": "git+ssh://git@gitlab.com/furry-installers/boilerplates/capacitor-js.git"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@furrymink/cli": "^0.0.25"
|
|
12
15
|
},
|
|
13
16
|
"keywords": [],
|
|
14
17
|
"author": "",
|
|
15
18
|
"license": "ISC",
|
|
16
19
|
"type": "commonjs",
|
|
17
20
|
"bugs": {
|
|
18
|
-
"url": "https://gitlab.com/furry-installers/boilerplates/
|
|
21
|
+
"url": "https://gitlab.com/furry-installers/boilerplates/capacitor-js/issues"
|
|
19
22
|
},
|
|
20
|
-
"homepage": "https://gitlab.com/furry-installers/boilerplates/
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"@capacitor/core": "^8.6.0",
|
|
24
|
-
"@furrymink/cli": "^0.0.2",
|
|
25
|
-
"@rollup/plugin-commonjs": "^29.0.3",
|
|
26
|
-
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
27
|
-
"dotenv": "^18.0.9",
|
|
28
|
-
"express": "^5.3.0",
|
|
29
|
-
"nodemon": "^3.1.14",
|
|
30
|
-
"rollup": "^4.68.0"
|
|
23
|
+
"homepage": "https://gitlab.com/furry-installers/boilerplates/capacitor-js#readme",
|
|
24
|
+
"bin": {
|
|
25
|
+
"capacitorjs": "bin/capacitorjs"
|
|
31
26
|
}
|
|
32
27
|
}
|
package/nodemon.json
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|