2022-12-20 02:35:08 +01:00
|
|
|
# Prompt Commands
|
2022-06-08 02:25:35 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# @scripthaus command webpack-watch
|
2022-07-09 10:37:19 +02:00
|
|
|
# @scripthaus cd :playbook
|
2022-06-08 02:25:35 +02:00
|
|
|
node_modules/.bin/webpack --watch --config webpack.dev.js
|
|
|
|
```
|
|
|
|
|
2022-11-01 08:07:25 +01:00
|
|
|
```bash
|
|
|
|
# @scripthaus command webpack-build
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/webpack --config webpack.dev.js
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-07-09 10:37:19 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command webpack-electron-watch
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/webpack --watch --config webpack.electron.js
|
|
|
|
```
|
|
|
|
|
2022-11-01 08:07:25 +01:00
|
|
|
```bash
|
|
|
|
# @scripthaus command webpack-electron-build
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/webpack --config webpack.electron.js
|
|
|
|
```
|
|
|
|
|
2022-07-09 10:37:19 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command electron-rebuild
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/electron-rebuild
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# @scripthaus command electron
|
|
|
|
# @scripthaus cd :playbook
|
2023-01-23 08:10:37 +01:00
|
|
|
PROMPT_DEV=1 PCLOUD_ENDPOINT="https://ot2e112zx5.execute-api.us-west-2.amazonaws.com/dev" node_modules/.bin/electron dist-dev/emain.js
|
2022-07-09 10:37:19 +02:00
|
|
|
```
|
|
|
|
|
2022-06-08 02:25:35 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command devserver
|
2022-07-09 10:37:19 +02:00
|
|
|
# @scripthaus cd :playbook
|
2022-06-08 02:25:35 +02:00
|
|
|
node_modules/.bin/webpack-dev-server --config webpack.dev.js --host 0.0.0.0
|
|
|
|
```
|
2022-07-05 07:37:45 +02:00
|
|
|
|
2023-03-28 21:10:11 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command webshare-devserver
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/webpack-dev-server --config webpack.share.dev.js --host 127.0.0.1
|
|
|
|
```
|
|
|
|
|
2023-04-02 07:25:18 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command webshare-build
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/webpack --config webpack.share.dev.js
|
|
|
|
```
|
|
|
|
|
2022-07-05 07:37:45 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command typecheck
|
2022-07-09 10:37:19 +02:00
|
|
|
# @scripthaus cd :playbook
|
2022-07-05 07:37:45 +02:00
|
|
|
node_modules/.bin/tsc --jsx preserve --noEmit --esModuleInterop --target ES5 --experimentalDecorators --downlevelIteration src/sh2.ts
|
|
|
|
```
|
2022-10-31 22:59:31 +01:00
|
|
|
|
2023-03-29 10:05:36 +02:00
|
|
|
```bash
|
|
|
|
# @scripthaus command typecheck-webshare
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
node_modules/.bin/tsc --jsx preserve --noEmit --esModuleInterop --target ES5 --experimentalDecorators --downlevelIteration src/webshare.ts
|
|
|
|
```
|
|
|
|
|
2022-10-31 22:59:31 +01:00
|
|
|
```bash
|
2022-11-01 08:07:25 +01:00
|
|
|
# @scripthaus command build-package
|
2022-10-31 22:59:31 +01:00
|
|
|
# @scripthaus cd :playbook
|
2022-11-02 05:18:40 +01:00
|
|
|
rm -rf dist/
|
|
|
|
rm -rf bin/
|
2022-12-28 22:29:18 +01:00
|
|
|
rm -rf build/
|
2022-11-02 05:18:40 +01:00
|
|
|
node_modules/.bin/webpack --config webpack.prod.js
|
|
|
|
node_modules/.bin/webpack --config webpack.electron.prod.js
|
2023-02-24 00:19:01 +01:00
|
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
|
|
|
(cd ../mshell; GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../sh2/bin/mshell/mshell-v0.2-darwin.amd64 main-mshell.go)
|
|
|
|
(cd ../mshell; GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../sh2/bin/mshell/mshell-v0.2-darwin.arm64 main-mshell.go)
|
|
|
|
(cd ../mshell; GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../sh2/bin/mshell/mshell-v0.2-linux.amd64 main-mshell.go)
|
|
|
|
(cd ../mshell; GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../sh2/bin/mshell/mshell-v0.2-linux.arm64 main-mshell.go)
|
|
|
|
(cd ../sh2-server; GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../sh2/build/prompt-local-server.amd64 ./cmd)
|
|
|
|
(cd ../sh2-server; GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../sh2/build/prompt-local-server.arm64 ./cmd)
|
2022-12-28 22:29:18 +01:00
|
|
|
lipo -create -output bin/prompt-local-server build/prompt-local-server.amd64 build/prompt-local-server.arm64
|
2022-11-01 08:07:25 +01:00
|
|
|
node_modules/.bin/electron-forge make
|
2022-10-31 22:59:31 +01:00
|
|
|
```
|
2022-11-02 05:18:40 +01:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# @scripthaus command open-electron-package
|
|
|
|
# @scripthaus cd :playbook
|
2022-12-20 02:35:08 +01:00
|
|
|
open out/Prompt-darwin-x64/Prompt.app
|
2022-11-02 05:18:40 +01:00
|
|
|
```
|
2022-12-28 22:29:18 +01:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# @scripthaus command create-dmg
|
|
|
|
# @scripthaus cd :playbook
|
2023-02-24 08:47:21 +01:00
|
|
|
DMG_VERSION=$(node -e 'console.log(require("./version.js"))')
|
|
|
|
DMG_NAME="prompt-macos-x86-${DMG_VERSION}.dmg"
|
|
|
|
rm *.dmg
|
2023-03-18 05:15:42 +01:00
|
|
|
/Users/mike/work/gopath/src/github.com/create-dmg/create-dmg/create-dmg \
|
2022-12-28 22:29:18 +01:00
|
|
|
--volname "Prompt" \
|
|
|
|
--window-pos 200 120 \
|
|
|
|
--window-size 600 300 \
|
|
|
|
--icon-size 100 \
|
|
|
|
--icon "Prompt.app" 200 130 \
|
|
|
|
--hide-extension "Prompt.app" \
|
|
|
|
--app-drop-link 400 125 \
|
2023-02-24 08:47:21 +01:00
|
|
|
$DMG_NAME \
|
2022-12-28 22:29:18 +01:00
|
|
|
"out/Prompt-darwin-x64/Prompt.app"
|
|
|
|
```
|
2023-01-12 07:20:23 +01:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# @scripthaus command create-dmg-m1
|
|
|
|
# @scripthaus cd :playbook
|
2023-02-24 08:47:21 +01:00
|
|
|
DMG_VERSION=$(node -e 'console.log(require("./version.js"))')
|
|
|
|
DMG_NAME="prompt-macos-arm64-${DMG_VERSION}.dmg"
|
|
|
|
rm *.dmg
|
2023-01-12 07:20:23 +01:00
|
|
|
../../create-dmg/create-dmg/create-dmg \
|
|
|
|
--volname "Prompt" \
|
|
|
|
--window-pos 200 120 \
|
|
|
|
--window-size 600 300 \
|
|
|
|
--icon-size 100 \
|
|
|
|
--icon "Prompt.app" 200 130 \
|
|
|
|
--hide-extension "Prompt.app" \
|
|
|
|
--app-drop-link 400 125 \
|
2023-02-24 08:47:21 +01:00
|
|
|
$DMG_NAME \
|
2023-01-12 07:20:23 +01:00
|
|
|
"out/Prompt-darwin-arm64/Prompt.app"
|
|
|
|
```
|
2023-04-02 07:25:18 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# @scripthaus command sync-webshare-dev
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
aws --profile prompt-s3 s3 cp webshare/static/index.html s3://prompt-devshare-static/ --cache-control 'public, max-age=600, s-maxage=300, stale-if-error=60'
|
|
|
|
aws --profile prompt-s3 s3 sync webshare/static s3://prompt-devshare-static/static --cache-control 'public, max-age=600, s-maxage=300, stale-if-error=60'
|
|
|
|
aws --profile prompt-s3 s3 sync webshare/dist-dev s3://prompt-devshare-static/ --cache-control 'public, max-age=600, s-maxage=300, stale-if-error=60'
|
|
|
|
```
|