This folder includes the source code of all built-in JavaScript services, these services will support the data fetching and parsing part of the app.
Modules in this folder are used to create, build and run services.
/any-service-cli
Command line tool to create a service from template.
/any-service-api
The service API module, written in TypeScript.
/any-service-compile
Using webpack
, babel
and other tools to compile and bundle services.
/any-service-runner
(WIP) Service runner for browsers. Providing web ui to run services.
/any-service-template
The service template module.
/any-service-testing
Provides test utility functions like createTestService()
to test services on the node environment.
/services
Built-in services.
- Bun The JavaScript runtime and package manager.
cd project/root/dir
bun ./scripts/service/setup.js
The setup.js
script will do:
- Install dependencies for projects in the
js/any-***
andjs/services/
folder - Build local dependencies, e.g.
js/any-service-api
,js/any-service-test
- Link
js/any-service-cli
so you can use theany-service-cli
command to create a new project
-
Run
any-service-cli
command to create new project:cd js/services/ any-service-cli
-
Install dependencies:
cd NewProject bun install
-
Test, run and build:
# Test with jest framework bun test # (WIP) Start runner servers to debug service in a browser bun runner # Build bun build-android
Run commands for all built-in projects
# Install dependencies for all projects
bun ./scripts/service/runInEachProject.js bun install
# Upgrade 'typescript' for all projects
bun ./scripts/service/runInEachProject.js bun update typescript
Build all built-in services:
bun ./scripts/service/buildAll.js --platform=android --output=/path/to/output_dir