@wixc3/engine-core
v16.0.0@wixc3/engine-core
Run-time abstractions for creating multi-environment web applications while practicing feature-oriented software development.
Approach
- An application is a set of one or more features.
- A feature contains all the integration code required to get a subset of product functionality implemented.
- Features may depend on other features, consume their exposed services and register into their slots.
- A service is a set of functions exposed as an API of a feature.
- A slot is a registry of any type, which allows pluggability via registration.
- Environments (browser/webworker/iframe) are defined by features, and have semantic names (main/processing/preview).
- Each slot and service is available in a specific environment.
- Services can be marked as accessible cross-environments, which exposes them as async APIs in those environment.
Feature
A feature is combined of several files:
<feature-name>.feature.ts
- feature definition file.<feature-name>.<some-env>.env.ts
- some-env specific setup code.<feature-name>.<another-env>.env.ts
- another-env specific setup code.
Feature definition file
Feature definition is created in a <feature-name>.feature.ts
file, and is exposed as the default
export.
For example:
/* my-feature.feature.ts */
import { Feature } from '@wixc3/engine-core';
/* defining a new feature */
export default new Feature({
id: 'myFeature' /* unique id for the feature */,
dependencies: [
/* other features the feature depends on */
],
api: {
/* slots, services, and configurations of the feature */
},
});
npm i @wixc3/[email protected]
Metadata
- MIT
- Whatever
- Unknown
- released 10/29/2020
Downloads
Maintainers
eifr0980, serhiiz, mayameshik, adamy, kenanu, anna-c, danalevy, itpurchases, ariki, romanyarinovskytest, im0b, eladdo92, arnonkehat, leeronwix, amirgabay, zemlanin, tuchk4, erezshasha, anatfenn, annielr, liorer, hadarvid, netanelgilad, galil-team, igalh, silyevsk, mariar, ranyitzhaki, jurasm, aleksanderd, roysom, wix-ambassador, kelyar, nettaru, deduck, pistolpete_, shacharg, alf-er, vkobeliatskyi, denysdovhan, sestri4kina, leonidl, oleksii-uxd, chuvpylov.m, maksym_wix, wtfil, rashellek, nadavwix, idoros, domshlakn, zombiefruit, xyrue, bohdan-lytvynov, ikachura, kranux, marijuss, viattik, romabelka, sdoomz, tompereswix, alexeye, danieleww, alexanderg-wix, ipanasenko, maksimpe, archram, asafr, tomerlichtash, tzelon, tyv, jomarton, shahata, talh, alisey, itaystwix, henrykuzmick, amiryonatan, moshfeu, gran33, vladik7244, liorcode, zsgalusz, listochkin, papamisty, yevhenk, omerb, roeia, maxlk, schlez, sapirc, adiramsalem, oripi, rotemmiz, idok, borisk, alonbl, sagiiwix, ariell, sirmagis, nira-wix, andriuss, olshen, dmfilipenko, ydaniv, vladislavz, ethanshar, t0mas, mantasm, guyca, yoav, yairhaimo, karolisb, interal, danbars, dleshem, inbaltish, guyw, giladartzi, zeevg, elip, ronnyr, nayish, smangam, yanivefraim, dimarysk, felixmosh, eransh, shanik, guybe, selama, omerbu, jonathana.wix, alex5il, nachshons, yoavamit, yershalom, danielagr, liorur, chenroth-wix, avivr, bolshchikov, blue16, baraki, simonaspa, mykhailom, harelig, quitten, wixnpm, wix-ci, cijoe, talga, iamromanyarinovsky, tomermes, omerk, tomrav, avi.vahl, alexswix,