cortex-recombiner

4.0.1 • Public • Published

cortex-recombiner

recombine the cortex package structure to make it compatible with webpack

Usage

V4 (async)

const recombiner = require('cortex-recombiner');
 
// ...
 
recombiner({
    base: __dirname,                        // the base dir path of webpack project
    source_path: './neurons',               // the relative path of neurons source dir
    target_path: './node_modules/',         // the relative path of target dir where you want to recombine
    cortex_json_file: './cortex.json',      // the path of cortex config file
    scope: '@cortex',                       // recombined packages scope, require your package as `@cortex/package-name`
    noBeta: false                           // whether ignore cortex beta package in source_path
}).then(function(result) {
    // ...
}, function(error) {
    // ...
});
 
// ...

V3 (async)

const recombiner = require('cortex-recombiner');
 
// ...
 
// return a promise
recombiner({
    base: __dirname,                        // the base dir path of webpack project
    source_path: './neurons',               // the relative path of neurons source dir
    target_path: './node_modules/@cortex',  // the relative path of target dir where you want to recombine
    cortex_json_file: './cortex.json',      // the path of cortex config file
    noBeta: false                           // whether ignore cortex beta package in source_path
}).then(function(result) {
    // ...
}, function(error) {
    // ...
});
 
// ...

V1 & V2 (sync)

const recombiner = require('cortex-recombiner');
 
// ...
 
recombiner({
    base: __dirname,                        // the base dir path of webpack project
    source_path: './neurons',               // the relative path of neurons source dir
    target_path: './node_modules/@cortex',  // the relative path of target dir where you want to recombine
    cortex_json_file: './cortex.json',      // the path of cortex config file
    noBeta: false                           // whether ignore cortex beta package in source_path
});
 
// ...

Readme

Keywords

Package Sidebar

Install

npm i cortex-recombiner

Weekly Downloads

1

Version

4.0.1

License

MIT

Last publish

Collaborators

  • madlord