-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: js sdk * refactor: move js back where it belongs * docs: generate docs using typedoc * feat: sdk versioning scheme * ci: silence pvs warning * docs: bring back old incomplete js docs * style: readAnalog naming * fix: rename script compatibility screens Co-authored-by: あく <alleteam@gmail.com>
- Loading branch information
1 parent
e4c8270
commit 85e5642
Showing
62 changed files
with
3,150 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,4 +63,7 @@ PVS-Studio.log | |
|
||
.gdbinit | ||
|
||
/fbt_options_local.py | ||
/fbt_options_local.py | ||
|
||
# JS packages | ||
node_modules/ |
11 changes: 11 additions & 0 deletions
11
applications/debug/unit_tests/resources/unit_tests/js/basic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
let tests = require("tests"); | ||
let flipper = require("flipper"); | ||
|
||
tests.assert_eq(1337, 1337); | ||
tests.assert_eq("hello", "hello"); | ||
|
||
tests.assert_eq("compatible", sdkCompatibilityStatus(0, 1)); | ||
tests.assert_eq("firmwareTooOld", sdkCompatibilityStatus(100500, 0)); | ||
tests.assert_eq("firmwareTooNew", sdkCompatibilityStatus(-100500, 0)); | ||
tests.assert_eq(true, doesSdkSupport(["baseline"])); | ||
tests.assert_eq(false, doesSdkSupport(["abobus", "other-nonexistent-feature"])); | ||
|
||
tests.assert_eq("flipperdevices", flipper.firmwareVendor); | ||
tests.assert_eq(0, flipper.jsSdkVersion[0]); | ||
tests.assert_eq(1, flipper.jsSdkVersion[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ App( | |
provides=[ | ||
"updater_app", | ||
"js_app", | ||
"js_app_start", | ||
# "archive", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
applications/system/js_app/packages/create-fz-app/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Flipper Zero JavaScript SDK Wizard | ||
This package contains an interactive wizard that lets you scaffold a JavaScript | ||
application for Flipper Zero. | ||
|
||
## Getting started | ||
Create your application using the interactive wizard: | ||
```shell | ||
npx @flipperdevices/create-fz-app@latest | ||
``` | ||
|
||
Then, enter the directory with your application and launch it: | ||
```shell | ||
cd my-flip-app | ||
npm start | ||
``` | ||
|
||
You are free to use `pnpm` or `yarn` instead of `npm`. | ||
|
||
## Documentation | ||
Check out the [JavaScript section in the Developer Documentation](https://developer.flipper.net/flipperzero/doxygen/js.html) |
Oops, something went wrong.