Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FL-3918] Full-fledged JS SDK + npm packages #3963

Merged
merged 11 commits into from
Oct 31, 2024

Conversation

portasynthinca3
Copy link
Member

@portasynthinca3 portasynthinca3 commented Oct 18, 2024

What's new

Verification

  • Run unit tests
  • Install Node.js together with npm
  • Run the interactive project creation wizard:
    • If the packages do end up getting published, npx @flipperdevices/create-fz-app@latest
    • If not, cd applications/system/js_app/packages && npm exec ./create-fz-app. This will fail at the "Installing packages" step, which is expected if the package has not yet been published. Then, cd my-flip-app and change the version specifier in package.json for the fz-sdk package from ^0.1 to link:../fz-sdk
  • cd into the newly created app
  • Do npm start
  • Verify that the app launches on the Flipper

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@portasynthinca3 portasynthinca3 added New Feature Contains an IMPLEMENTATION of a new feature Documentation Everything related to docs & code comments JS JS Runtime, loader and API labels Oct 18, 2024
Copy link

github-actions bot commented Oct 18, 2024

Compiled f7 firmware for commit 6ca58d9b:

@portasynthinca3 portasynthinca3 changed the title Full-fledged JS SDK + npm packages [FL-3918] Full-fledged JS SDK + npm packages Oct 18, 2024
@portasynthinca3 portasynthinca3 marked this pull request as draft October 18, 2024 18:04
@portasynthinca3
Copy link
Member Author

portasynthinca3 commented Oct 21, 2024

@hedger Please help me out with CI/CD here. Couple of things:

  1. Docs generation for JS: cd applications/system/js_app/packages/fz-sdk && pnpm install && pnpm run build-docs will put the HTML into applications/system/js_app/packages/fz-sdk/docs.
  2. Somehow link the main developer documentation with the new JS documentation
  3. fbt really wants to format the images in applications/system/js_app/packages/fz-sdk/images. They're for displaying on the web, not for putting onto the device.

EDIT: to be done later.

Copy link

PVS-Studio report for commit 441bc458:

@Willy-JL
Copy link
Contributor

3. fbt really wants to format the images in applications/system/js_app/packages/fz-sdk/images. They're for displaying on the web, not for putting onto the device.

i had similar issue, we still have applications/external folder and many apps have screenshots. this is what i did, allows to exclude some folders from images linting:
Next-Flip/Momentum-Firmware@314554f

@portasynthinca3 portasynthinca3 marked this pull request as ready for review October 22, 2024 19:01
@portasynthinca3 portasynthinca3 linked an issue Oct 22, 2024 that may be closed by this pull request
@skotopes skotopes merged commit 85e5642 into dev Oct 31, 2024
11 checks passed
@skotopes skotopes deleted the portasynthinca3/3918-js-packages branch October 31, 2024 02:42
@portasynthinca3 portasynthinca3 mentioned this pull request Oct 31, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Everything related to docs & code comments JS JS Runtime, loader and API New Feature Contains an IMPLEMENTATION of a new feature
Projects
None yet
3 participants