Pitaya Framework

raw JSON →
0.0.44 verified Sat May 09 auth: no javascript

An Aurelia-based plugin framework for building modular web applications with TypeScript support. Currently at version 0.0.44, with low release cadence. It is bootstrapped with aurelia-cli and provides custom elements, attributes, value converters, and binding behaviors. Unlike full Aurelia applications, this package focuses on reusable resources that can be imported into any Aurelia project. It uses PLATFORM.moduleName() for compatibility with webpack, CLI bundler, and jspm. The package does not bundle core Aurelia dependencies, relying on the host app to provide them, which reduces duplication risk. TypeScript types are included.

error Error: Cannot find module 'pitaya-framework'
cause Package not installed or incorrect import path.
fix
npm install pitaya-framework --save
error TypeError: aurelia.use.feature is not a function
cause aurelia instance not properly configured before calling feature().
fix
Ensure aurelia.use.standardConfiguration() is called before aurelia.use.feature().
error PLATFORM.moduleName is not defined
cause Missing import of PLATFORM from aurelia-pal.
fix
import { PLATFORM } from 'aurelia-pal';
error Module parse failed: Unexpected token (1:8) - You may need an appropriate loader for this file type.
cause Webpack not configured to handle TypeScript files.
fix
Add TypeScript loader to webpack config (e.g., ts-loader).
gotcha PLATFORM.moduleName() wrapper is required when registering resources in globalResources().
fix Always wrap resource paths: PLATFORM.moduleName('./path/to/resource')
gotcha Importing from 'resources' only works in the dev app, not in consumer apps.
fix In consumer apps, import from the package itself or use PLATFORM.moduleName() as configured.
deprecated The package does not include core Aurelia dependencies, relying on host app. This may cause peer dependency warnings in npm/yarn.
fix Add aurelia-framework, aurelia-pal, etc. as peerDependencies or ensure host app provides them.
gotcha Do not import PLATFORM from pitaya-framework; it re-exports from aurelia-pal but may cause version conflicts.
fix Always import PLATFORM directly from 'aurelia-pal'.
npm install pitaya-framework
yarn add pitaya-framework
pnpm add pitaya-framework

Shows how to register pitaya-framework as a feature using PLATFORM.moduleName() and the configure function.

// In your Aurelia app's main.ts (or main.js)
import { PLATFORM } from 'aurelia-pal';
import { configure } from 'pitaya-framework';

export function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    .feature(PLATFORM.moduleName('pitaya-framework/index'));

  aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app')));
}