targetprocess-mashup-webpack-plugin

1.1.0 • Public • Published

targetprocess-mashup-webpack-plugin

Webpack plugin to help writing Targetprocess mashups.

Provides support for mashup system loader and wraps config data.

Using

Do not set any values to output.library amd output.libraryTarget in webpack config.

// webpack.config.js
{
    plugins: [
        new TargetprocessMashupPlugin(mashupName, {
            useConfig: false
        }),
    }
}
// src/index.js
 
var dep = require('dependnency');
console.log('my pretty mashup');

webpack command will produce single file, which content can be inserted inside Mashup Manager textarea. You can use all webpack features: require NPM modules, async load of chunks, import text files, etc.

Also, it adds is a global variable mashup. It contains properties: - config: data from module <mashupName>/config (see below) - variables: mashup system data

// src/index.js
console.log(mashup.variables.placeholderId); // footerPlaceholder

Options

useConfig (boolean)

Will automatically load module <mashupName>/config and use its data in mashup.config. You should create this module separately.

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Package Sidebar

Install

npm i targetprocess-mashup-webpack-plugin

Weekly Downloads

2

Version

1.1.0

License

none

Last publish

Collaborators

  • roadhump