Development

July 9, 2026 · View on GitHub

Litefin uses a modern web development stack optimized for generating highly compatible TV bundles.

Build Pipeline

The project uses Webpack (6 config targets) for bundling and Gulp for task orchestration and packaging.

Key Commands

CommandDescription
npm run buildBuild all 6 webpack variants (modern, normal, legacy, ultra-legacy, debug, normal-oblong)
npm run build:modernTizen 6.5+ / webOS 6.0+ (pure ES6+, no transpilation)
npm run build:normalTizen 5.0+ (Chromium 63, partial transpilation)
npm run build:legacyTizen 3.0+ (Chromium 47, full ES5 transpilation)
npm run build:debugModern variant + source maps for on-device debugging
npm run devWatch mode (Normal variant)
npm run serveWebpack dev server (Debug variant)
npm run cleanRemoves dist/, *.wgt, *.ipk
npm run lintESLint check on src/
npm run lint:fixESLint auto-fix
npm run formatPrettier write on src/
npm run format:checkPrettier check only

Package Commands

CommandOutput
npm run packageAll 8 variants (4 WGT + 4 IPK)
npm run package:tizen-modernTizen WGT (Modern)
npm run package:tizen-normalTizen WGT (Normal)
npm run package:tizen-testLitefin-Tizen-Test.wgt (Normal variant)
npm run package:tizen-debugTizen WGT with debug symbols
npm run package:webos-normalwebOS IPK (Normal)
npm run package:webos-modernwebOS IPK (Modern)
npm run package:webos-legacywebOS IPK (Legacy)
npm run package:webos-ultra-legacywebOS IPK (Ultra Legacy)

Locale Commands

CommandDescription
npm run locale:checkValidate locale JSON files match en-us.json reference
npm run locale:syncSync all locales to match en-us.json structure
npm run locale:statusShow translation coverage report
npm run locale:updateUpdate languages.js with latest coverage percentages

Targeted Build Variants

The build system outputs 8 distinct variants to cover the compatibility matrix:

VariantTizenwebOSEngine Compliance
Modern6.5+6.0+Pure ES6+, no transpilation
Normal5.0+4.0+Chromium 63, partial transpilation
Legacy3.0+Chromium 47, ES5 transpilation
Ultra Legacy2.3+Chromium 32, heavy polyfills, style-loader, backup-logger

Babel transpilation is configured inline in webpack.config.cjs (no .babelrc). Ultra-legacy builds use style-loader instead of MiniCssExtractPlugin because file:// protocol on older Tizen blocks CSS file loading.

Development Guidelines

  • Modules: Always use ES6 modules (import/export) with .js extension.
  • Naming: PascalCase for classes/files, camelCase for functions/variables/methods.
  • Private members: Underscore prefix (this._state, this._load()).
  • Strictness: Strict equality (===), const/let (no var), and no literal throws enforced via ESLint.
  • Logging: Use the logger utility at module level (const log = logger.create('ModuleName')); never use console.log in production code.
  • Async: Use async/await with try/catch for all async operations.

Code Conventions

  • Prettier: Single quotes, semicolons required, 4-space indent, 120 print width, no trailing commas, always arrow parens.
  • ESLint rules: no-var (error), eqeqeq (error, null-ignore), no-throw-literal (error), no-duplicate-imports (error), prefer-const (warn), no-unused-vars (warn, args:none).

Deployment

Certificates

To create signed packages, you must place your Tizen certificates in the .sign/ directory. This is required for the package tasks to produce valid .wgt bundles.

Sideloading

  1. Packaging: Run the relevant npm script (npm run package:tizen-* or npm run package:webos-*) to produce the .wgt or .ipk bundle.
  2. Installation:
    • Recommended (Tizen): Use Apps2Samsung for a streamlined sideloading process.
    • Manual: Use Tizen Studio's Device Manager or the webOS CLI (ares-install) to push the bundle directly to the TV.