mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-17 13:17:39 +00:00
Merge pull request #6612 from keymanapp/chore/developer/server-remove-lerna
chore(developer): fixup server build without lerna 🎡
This commit is contained in:
commit
a81acc66ea
5 changed files with 32 additions and 13 deletions
3
developer/server/.gitignore
vendored
3
developer/server/.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
dist/
|
||||
build/
|
||||
node_modules/
|
||||
src/site/resource/
|
||||
src/site/resource/
|
||||
tsconfig.tsbuildinfo
|
||||
|
|
@ -36,7 +36,7 @@ build_addins() {
|
|||
# Build node-windows-trayicon
|
||||
#
|
||||
|
||||
pushd "./node_modules/node-windows-trayicon"
|
||||
pushd "../../node_modules/node-windows-trayicon"
|
||||
rm -rf build
|
||||
npx node-gyp clean configure build --arch=$ARCH --silent
|
||||
cp build/Release/addon.node "$TRAYICON_TARGET"
|
||||
|
|
@ -46,7 +46,7 @@ build_addins() {
|
|||
# Build hetrodo-node-hide-console-window-napi
|
||||
#
|
||||
|
||||
pushd "./node_modules/hetrodo-node-hide-console-window-napi"
|
||||
pushd "../../node_modules/hetrodo-node-hide-console-window-napi"
|
||||
rm -rf build
|
||||
npx node-gyp clean configure build --arch=$ARCH --silent
|
||||
cp build/Release/node-hide-console-window.node "$HIDECONSOLE_TARGET"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA
|
|||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
EX_USAGE=64
|
||||
|
||||
. "$KEYMAN_ROOT/resources/build/jq.inc.sh"
|
||||
|
||||
pushd "$(dirname "$THIS_SCRIPT")"
|
||||
|
||||
# Build the main script.
|
||||
|
|
@ -100,7 +102,7 @@ if (( install_dependencies )) ; then
|
|||
rm -f "$KEYMAN_ROOT"/node_modules/ngrok/bin/ngrok.exe
|
||||
fi
|
||||
|
||||
set_npm_version || fail "Setting version failed."
|
||||
# set_npm_version || fail "Setting version failed."
|
||||
|
||||
# ----------------------------------------
|
||||
# Rebuild and bundle addins
|
||||
|
|
@ -162,13 +164,28 @@ fi
|
|||
# ----------------------------------------
|
||||
|
||||
if (( production )) ; then
|
||||
# We'll build in the build/ folder
|
||||
rm -rf build/
|
||||
mkdir build/
|
||||
cp -R dist/ package.json package-lock.json build/
|
||||
cd build/
|
||||
# We need to build in a tmp folder so that npm doesn't get confused by our
|
||||
# monorepo setup, and so we can copy the relevant node_modules in, because
|
||||
# we'll need them in order to build the deployable version.
|
||||
|
||||
PRODBUILDTEMP=`mktemp -d`
|
||||
echo "Preparing in $PRODBUILDTEMP"
|
||||
# Remove @keymanapp devDependencies because they won't install outside the
|
||||
# monorepo context
|
||||
cat package.json | "$JQ" \
|
||||
'. | del(.devDependencies."@keymanapp/resources-gosh") | del(.devDependencies."@keymanapp/keyman-version")' \
|
||||
> "$PRODBUILDTEMP/package.json"
|
||||
|
||||
pushd "$PRODBUILDTEMP"
|
||||
npm install --omit=dev --omit=optional
|
||||
# See https://github.com/bubenshchykov/ngrok/issues/254, https://github.com/bubenshchykov/ngrok/pull/255
|
||||
rm -f node_modules/ngrok/bin/ngrok.exe
|
||||
cd ..
|
||||
popd
|
||||
|
||||
# We'll build in the build/ folder
|
||||
rm -rf build/
|
||||
mkdir build/
|
||||
cp -R dist/* build/
|
||||
cp -R "$PRODBUILDTEMP"/* build/
|
||||
rm -rf "$PRODBUILDTEMP"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"outDir": "dist/",
|
||||
"rootDir": "src/",
|
||||
"declaration": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@
|
|||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
|
||||
JQ_THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
|
||||
# . "$(dirname "$THIS_SCRIPT")/build-utils.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
case "${OSTYPE}" in
|
||||
"cygwin")
|
||||
JQ=$(dirname "$THIS_SCRIPT")/jq-win64.exe
|
||||
JQ=$(dirname "$JQ_THIS_SCRIPT")/jq-win64.exe
|
||||
;;
|
||||
"msys")
|
||||
JQ=$(dirname "$THIS_SCRIPT")/jq-win64.exe
|
||||
JQ=$(dirname "$JQ_THIS_SCRIPT")/jq-win64.exe
|
||||
;;
|
||||
*)
|
||||
JQ=jq
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue