Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:openwebf/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Sep 14, 2022
2 parents 767d0ff + 14d58b5 commit 75ac23a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
nodeVersion: "16"
cmakeVersion: "3.22.x"
flutterVersion: "2.8.1"
flutterVersion: "3.0.5"

jobs:
build_macos:
Expand All @@ -24,17 +24,19 @@ jobs:
- uses: jwlawson/actions-setup-cmake@v1.11
with:
cmake-version: ${{ env.cmakeVersion }}
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutterVersion }}
- run: flutter config --enable-macos-desktop
- run: flutter doctor -v
- name: Npm install
run: npm install --ignore-scripts
- name: Build Cli Vendor App
run: npm install
- name: Build Cli Vendor Appc
run: sh build_macos.sh
- name: Upload Cli Vendor App
run: OSS_AK=${{ secrets.ALIYUN_OSS_AK }} OSS_SK=${{ secrets.ALIYUN_OSS_SK }} node scripts/upload.js
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./platforms/cli-macos/package.json
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
Expand All @@ -50,19 +52,21 @@ jobs:
- uses: jwlawson/actions-setup-cmake@v1.11
with:
cmake-version: ${{ env.cmakeVersion }}
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutterVersion }}
- name: Install gtk
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- run: flutter config --enable-linux-desktop
- run: flutter doctor -v
- name: Npm install
run: npm install --ignore-scripts
run: npm install
- name: Build Cli Vendor App
run: bash build_linux.sh
- name: Upload Cli Vendor App
run: OSS_AK=${{ secrets.ALIYUN_OSS_AK }} OSS_SK=${{ secrets.ALIYUN_OSS_SK }} node scripts/upload.js
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./platforms/cli-linux/package.json
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
You can install webf CLI with npm (you may need to use sudo on Linux or macOS):

```
npm config set foreground-scripts true // Make sure webf binaries can be downloade via install scripts.
npm install -g @openkraken/cli
npm install -g @openwebf/cli
```

Plaform support:
Expand All @@ -18,26 +17,26 @@ Plaform support:
**webf run**

```sh
Usage: kraken run [options] [bundle|url]
Usage: webf run [options] [bundle|url]

Start a kraken app.
Start a webf app.

Options:
-b --bundle <filename> Bundle path. One of bundle or url is needed, if both determined, bundle path will be used.
-u --url <URL> Bundle URL. One of bundle or URL is needed, if both determined, bundle path will be used.
-i --instruct <instruct> instruct file path.
-s, --source <source> Source code. pass source directory from command line
-m --runtime-mode <runtimeMode> Runtime mode, debug | release. (default: "debug")
--enable-kraken-js-log print kraken js to dart log (default: false)
--enable-webf-js-log print webf js to dart log (default: false)
--show-performance-monitor show render performance monitor (default: false)
-d, --debug-layout debug element's paint layout (default: false)
-h, --help output usage information
```
**kraken qjsc**
**webf qjsc**
```
Usage: kraken qjsc [options] <source> [destination]
Usage: webf qjsc [options] <source> [destination]
convert javascript code to quickjs bytecode.
Expand Down
4 changes: 2 additions & 2 deletions app/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.10)
project(runner LANGUAGES CXX)

set(BINARY_NAME "kraken_example")
set(APPLICATION_ID "com.example.kraken")
set(BINARY_NAME "webf_example")
set(APPLICATION_ID "com.example.webf")

cmake_policy(SET CMP0063 NEW)

Expand Down
5 changes: 3 additions & 2 deletions build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ build_release() {
flutter build linux --release
ARCH=$(arch)
if [[ "$ARCH" == "x86_64" ]]; then
mkdir -p $ROOT/build/linux/release/
mv $ROOT/app/build/linux/x64/release/bundle $ROOT/platforms/cli-linux/app
cd $ROOT/app/build/linux/x64/release
tar -zcvf ./app.tar.gz ./bundle
mv $ROOT/app/build/linux/x64/release/app.tar.gz $ROOT/platforms/cli-linux/app.tar.gz
else
echo "Only x86_64 support from now on, maybe someone can add more archs."
exit 1
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openwebf/cli",
"version": "0.12.0",
"version": "0.12.1",
"description": "Command Line Tools for WebF",
"bin": {
"webf": "bin/webf.js"
Expand All @@ -14,7 +14,7 @@
"lib"
],
"optionalDependencies": {
"@openwebf/cli-linux": "^0.12.0",
"@openwebf/cli-linux": "^0.12.1",
"@openwebf/cli-macos": "^0.12.4"
},
"author": "Kraken Team",
Expand Down
4 changes: 2 additions & 2 deletions platforms/cli-linux/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openwebf/cli-linux",
"version": "0.12.0",
"version": "0.12.1",
"description": "Command Line Tools for WebF",
"engines": {
"node": ">=10"
Expand All @@ -12,7 +12,7 @@
"x64"
],
"files": [
"app"
"app.tar.gz"
],
"author": "openwebf team",
"license": "MIT"
Expand Down

0 comments on commit 75ac23a

Please sign in to comment.