@brootal/export-import-plugin

0.1.11 • Public • Published

Cascade Initialization example:

Something.js

import { use } from '@brootal/core';
import importExport from "@brootal/export-import-plugin";

class Something extends Service {
    constructor(item) {
        super(item);
    }

    ...
    
    static app = app;
    static exportType = "zip";
    static exportWith = [
        { model: "SomethingDependent", foreignField: "parentId" }
    ];
}

use(Something, importExport());

export default Something;

Something.remote.js

import { Remote } from '@brootal/core';
import { ieRemote } from "@brootal/export-import-plugin";

export default {
    ...Remote,
    ...ieRemote
}

Service SomethingDeependent must have defined custom static export/import methods or default, obitained from @brootal/export-import-plugin

Readme

Keywords

none

Package Sidebar

Install

npm i @brootal/export-import-plugin

Weekly Downloads

1

Version

0.1.11

License

MIT

Unpacked Size

14.8 kB

Total Files

7

Last publish

Collaborators

  • voogryk