Registry / web-framework / pitaya-framework

pitaya-framework

JSON →
library0.0.44jsnpmunverified

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.

npm install pitaya-framework
INSTALL
IMPORT
SIG · PITAYA-FRAMEWORK
P
pitaya-framework
web-frameworkjavascriptv0.0.44
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PLATFORM
import { PLATFORM } from 'aurelia-pal';
import { PLATFORM } from 'pitaya-framework';
PLATFORM is re-exported from pitaya-framework, but importing directly from 'aurelia-pal' avoids version mismatches.
autoinject
import { autoinject } from 'aurelia-framework';
import { autoinject } from 'pitaya-framework';
autoinject is not part of pitaya-framework; it must be imported from aurelia-framework.
MyService
import { MyService } from 'resources';
import { MyService } from 'pitaya-framework';
In the dev app, 'resources' is an alias for the inner plugin. For consumers, the correct import path depends on how the plugin is registered.
config.globalResources
config.globalResources([PLATFORM.moduleName('./path/to/resource')]);
config.globalResources(['./path/to/resource']);
PLATFORM.moduleName() wrapper is mandatory for bundler compatibility.
default export
import { configure } from 'pitaya-framework';
import Pitaya from 'pitaya-framework';
The main entry exports a configure function, not a default export.

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'))); }
Debug
Known issues
gotchaPLATFORM.moduleName() wrapper is required when registering resources in globalResources().
fix
Always wrap resource paths: PLATFORM.moduleName('./path/to/resource')
affects: all
gotchaImporting 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.
affects: all
deprecatedThe 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.
affects: all
gotchaDo 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'.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'pitaya-framework'
Package not installed or incorrect import path.
fix
npm install pitaya-framework --save
TypeError: aurelia.use.feature is not a function
aurelia instance not properly configured before calling feature().
fix
Ensure aurelia.use.standardConfiguration() is called before aurelia.use.feature().
PLATFORM.moduleName is not defined
Missing import of PLATFORM from aurelia-pal.
fix
import { PLATFORM } from 'aurelia-pal';
Module parse failed: Unexpected token (1:8) - You may need an appropriate loader for this file type.
Webpack not configured to handle TypeScript files.
fix
Add TypeScript loader to webpack config (e.g., ts-loader).
Upgrade
Version history
0.0.44latest on npm
Audit
Dependencies
aurelia-frameworkoptionalRequired for Aurelia dependency injection, custom elements, and other framework features.
aurelia-paloptionalImported in src/index.ts, used for platform abstraction.
Agent activity
2 hits · last 30 days
node
2
Resources
pitaya-framework — npm install pitaya-framework · libregistry