https://github.com/ilib-js/ilib-mono-webos
Monorepo for containing the loctool and lint plugins for webOS Platform.
https://github.com/ilib-js/ilib-mono-webos
Last synced: 3 months ago
JSON representation
Monorepo for containing the loctool and lint plugins for webOS Platform.
- Host: GitHub
- URL: https://github.com/ilib-js/ilib-mono-webos
- Owner: iLib-js
- License: apache-2.0
- Created: 2024-12-16T06:08:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-15T05:42:21.000Z (3 months ago)
- Last Synced: 2026-04-15T06:28:27.650Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 37.4 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ilib-mono-webos
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.
## Table of Contents
- [General](#general)
- [Project Structure](#project-structure)
- [Packages](#packages)
- [Setup](#setup)
- [Testing](#testing)
- [Debugging](#debugging)
- [Contributing](#contributing)
- [Publishing](#publishing)
- [License](#license)
## General
The basic purpose and operation method are the same as [ilib-mono](https://github.com/iLib-js/ilib-mono).
For more details, please see the ilib-mono's [README.md](https://github.com/iLib-js/ilib-mono/blob/main/README.md) file.
### Project Structure
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 own `package.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.
## Packages
Here is the list of packages. Plugins are optimized for the webOS platform.
CategoryNameDescription
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.
xliff
ilib-xliff-webos
A parser and generator for webOS xliff files (XML Localization Interchange Format File)
## Setup
This project is developed using Node.js, nvm and pnpm.
Make sure you've got them installed before continuing.
- [pnpm.io](https://pnpm.io/): [installation](https://pnpm.io/installation)
- The pnpm version is specified in `packageManager` property of `package.json` file.
#### 1. Installation
Clone the repository to your local machine with HTTPS:
```bash
git clone https://github.com/iLib-js/ilib-mono-webos.git
```
or with SSH:
```bash
git clone git@github.com:iLib-js/ilib-mono-webos.git
````
Navigate to the project root directory:
```bash
cd ilib-mono-webos
```
Every command from now on should be run in the root directory of the project, unless stated otherwise.
#### 2. Enabling pnpm
Since v16.13, Node.js ships [Corepack](https://nodejs.org/api/corepack.html) 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:
```bash
corepack enable pnpm
```
Optional: `pnpm` might be hard to type, so you may use a shorter alias like `pn` instead. See
guide [here](https://pnpm.io/installation#using-a-shorter-alias).
#### 3. Installing project dependencies
The final step is to install the project dependencies. Run:
```bash
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.
#### 4. Install Git Hooks
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:
```bash
pnpm install
```
In case you need to install Git Hooks manually, you can run:
```bash
pnpm postinstall
```
## Testing
Tests are written using [Jest](https://jestjs.io/).
There are few ways to run tests:
* for an affected package(s) solely or
* for all packages in the monorepo.
#### 1. Run tests for affected package(s)
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:
```bash
pnpm test
```
#### 2. Run tests for all packages
To run all the tests for all packages in the monorepo, use:
```bash
pnpm test:all
```
#### 3. Other options
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.
1. Run all the tests for a single package in the monorepo:
```bash
pnpm --filter ilib-loctool-webos-javascript test
```
or `cd` into the package directory and run:
```bash
# cd packages/ilib-loctool-webos-javascript
pnpm test
```
2. Run all tests for a single file, by passing the path to the file as an argument to the `pnpm test` command, like
this:
```bash
pnpm --filter ilib-loctool-webos-javascript test -- JavaScriptFile.test.js
```
or `cd` into the package directory and run:
```bash
# cd packages/ilib-loctool-webos-javascript
pnpm test -- "JavaScriptFile.test.js"
```
## Debugging
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.
```bash
# cd packages/ilib-loctool-webos-javascript
pnpm run debug
```
By using the `--filter` option, you can debug from the root of the monorepo.
```bash
pnpm -filter ilib-loctool-webos-javascript debug
```
## Contributing
Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file for guidelines on how to contribute to this project.
## Publishing
When a PR is merged, a new PR is created with the title `Version Packages`. [example](https://github.com/iLib-js/ilib-mono-webos/pull/25)
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.
## License
This project is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for details.