This repository is a monorepo for the iLib-js project. It is designed to include webOS-related packages that are part of iLib-js, even though each package is published to npm as a separate package.
The monorepo is managed using pnpm workspaces and Turborepo.
All packages are placed in the packages/ directory. Each package has its own README.md and package.json, which are located in the package root directory.
The webOS-related repositories that existed under iLib-js have been migrated here to ilib-mono-webos.
All the packages moved to ilib-mono-webos are marked as archived in their original GitHub repositories.
The basic purpose and operation method are the same as ilib-mono.
For more details, please see the ilib-mono's README.md file.
The project is structured as follows:
packages/
- Contains all the packages that are part of the monorepo. Each package is a separate directory containing its ownpackage.json
file. Each package is published to npm as a separate package.package.json
- Contains the root project configuration.pnpm-workspace.yaml
- Contains the configuration for pnpm workspaces.turbo.json
- Contains the configuration for Turborepo.pnpm-lock.yaml
- Contains the lockfile for pnpm.codecov.yaml
- Contains the configuration for Codecove.
Here is the list of packages. Plugins are optimized for the webOS platform.
Category | Name | Description |
localization | ilib-loctool-webos-c | C filetype handler. |
ilib-loctool-webos-cpp | Cpp filetype handler. | |
ilib-loctool-webos-javascript | JavaScript filetype handler. | |
ilib-loctool-webos-qml | QML filetype handler. | |
ilib-loctool-webos-dart | Dart filetype handler. | |
ilib-loctool-webos-json | JSON filetype handler. | |
ilib-loctool-webos-json-resource | JSON resource filetype handler. | |
ilib-loctool-webos-ts-resource | TS resource filetype handler. | |
ilib-loctool-webos-common | contains functions commonly used in the plugin. | |
ilib-loctool-webos-dist | for the purpose of distribution for webOS platform. | |
samples-loctool | sample apps written for each app type to validate the webOS loctool plugins. | |
lint | ilib-lint-webos | provides the ability to parse webOS xliff files and provides rules to check. |
samples-lint | sample app to validate the webOS lint plugin. |
This project is developed using Node.js, nvm and pnpm. Make sure you've got them installed before continuing.
- pnpm.io: installation
- The pnpm version is specified in
packageManager
property ofpackage.json
file.
- The pnpm version is specified in
Clone the repository to your local machine with HTTPS:
git clone https://github.com/iLib-js/ilib-mono-webos.git
or with SSH:
git clone [email protected]:iLib-js/ilib-mono-webos.git
Navigate to the project root directory:
cd ilib-mono-webos
Every command from now on should be run in the root directory of the project, unless stated otherwise.
Since v16.13, Node.js ships Corepack for managing package managers, so you
do not need to install Corepack separately.
However, since this is an experimental feature, you need to enable it by running:
corepack enable pnpm
Optional: pnpm
might be hard to type, so you may use a shorter alias like pn
instead. See
guide here.
The final step is to install the project dependencies. Run:
pnpm install
You do NOT need to run pnpm install
from package directories, as the monorepo is set up to handle dependencies for all
packages automatically.
The project comes with a set of Git Hooks that are automatically installed as part of the post-installation process. You do not need to run a separate command for this. The hooks are set up when you run:
pnpm install
In case you need to install Git Hooks manually, you can run:
pnpm postinstall
Tests are written using Jest. There are few ways to run tests:
- for an affected package(s) solely or
- for all packages in the monorepo.
It is recommended to run tests only for projects impacted by recent changes. This saves time, resources, and optimizes the testing process by skipping tests for unmodified projects. To do so, simply run:
pnpm test
To run all the tests for all packages in the monorepo, use:
pnpm test:all
These may be useful for development and/or debugging purposes. These commands should be run from the root directory of the package you're interested in.
- Run all the tests for a single package in the monorepo:
pnpm --filter ilib-loctool-webos-javascript test
or cd
into the package directory and run:
# cd packages/ilib-loctool-webos-javascript
pnpm test
- Run all tests for a single file, by passing the path to the file as an argument to the
pnpm test
command, like this:
pnpm --filter ilib-loctool-webos-javascript test -- JavaScriptFile.test.js
or cd
into the package directory and run:
# cd packages/ilib-loctool-webos-javascript
pnpm test -- "JavaScriptFile.test.js"
Each package contains a command that can be used to run debug.
To set a breakpoint, simply write debugger
at the desired location, Start debugging with the following command.
# cd packages/ilib-loctool-webos-javascript
pnpm run debug
By using the --filter
option, you can debug from the root of the monorepo.
pnpm -filter ilib-loctool-webos-javascript debug
Please see the CONTRIBUTING.md file for guidelines on how to contribute to this project.
When a PR is merged, a new PR is created with the title Version Packages
. example
This PR was generated by the Changeset Github action. If there is already a PR opened with the same name, the content will be automatically merged into that PR.
- When packages are ready for release to npm, approve this PR to merge
- then the packages with your changes will automatically be published to npm.
This has been set in the ilib-mono-webos
repo to automate the operation.
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.