yocto-autobuilder2/yocto_console_view/webpack.config.js
Richard Purdie 36ae2de715 yocto_console_view: Convert to new plugin standards to match upstream buildbot
Our plugin is based on upstream buildbot's console plugin. Upstream moved
away from coffescript and made a number of other fixes and improvements.

Run decaffeinate on the coffeescript to translate to angularjs and then
convert to the new build environment and standards.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-29 18:33:03 +00:00

27 lines
730 B
JavaScript

'use strict';
const common = require('buildbot-build-common');
const env = require('yargs').argv.env;
const pkg = require('./package.json');
var event = process.env.npm_lifecycle_event;
var isTest = event === 'test' || event === 'test-watch';
var isProd = env === 'prod';
module.exports = function() {
return common.createTemplateWebpackConfig({
entry: {
scripts: './src/module/main.module.js',
styles: './src/styles/styles.less',
},
libraryName: pkg.name,
pluginName: pkg.plugin_name,
dirname: __dirname,
isTest: isTest,
isProd: isProd,
outputPath: __dirname + '/yocto_console_view/static',
extractStyles: true,
});
}();