diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-02-26 14:20:34 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-03-11 18:01:28 +0300 |
commit | 46c037410b8c7eaab3cf50a5cf44093aa2fd41f4 (patch) | |
tree | cb8c857562c4d3f819a5a8fcc563bc8f2c126e4e /build/build-plugins.js | |
parent | 44e6abcba50309df4fae56a9c7ef79145b64a356 (diff) |
Comply to the new rules.
Diffstat (limited to 'build/build-plugins.js')
-rw-r--r-- | build/build-plugins.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/build/build-plugins.js b/build/build-plugins.js index 1339684963..8569e979f1 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -7,16 +7,18 @@ 'use strict' -const path = require('path') -const rollup = require('rollup') -const babel = require('rollup-plugin-babel') -const banner = require('./banner.js') +const path = require('path') +const rollup = require('rollup') +const babel = require('rollup-plugin-babel') +const banner = require('./banner.js') -const TEST = process.env.NODE_ENV === 'test' +const TEST = process.env.NODE_ENV === 'test' const plugins = [ babel({ - exclude: 'node_modules/**', // Only transpile our source code - externalHelpersWhitelist: [ // Include only required helpers + // Only transpile our source code + exclude: 'node_modules/**', + // Include only required helpers + externalHelpersWhitelist: [ 'defineProperties', 'createClass', 'inheritsLoose', @@ -147,9 +149,7 @@ function getConfigByPluginKey(pluginKey) { function build(plugin) { console.log(`Building ${plugin} plugin...`) - const config = getConfigByPluginKey(plugin) - const external = config.external - const globals = config.globals + const { external, globals } = getConfigByPluginKey(plugin) let pluginPath = rootPath const utilObjects = [ @@ -179,7 +179,7 @@ function build(plugin) { input: bsPlugins[plugin], plugins, external - }).then((bundle) => { + }).then(bundle => { bundle.write({ banner: banner(pluginFilename), format: 'umd', @@ -189,8 +189,8 @@ function build(plugin) { file: path.resolve(__dirname, `${pluginPath}${pluginFilename}`) }) .then(() => console.log(`Building ${plugin} plugin... Done!`)) - .catch((err) => console.error(`${plugin}: ${err}`)) + .catch(error => console.error(`${plugin}: ${error}`)) }) } -Object.keys(bsPlugins).forEach((plugin) => build(plugin)) +Object.keys(bsPlugins).forEach(plugin => build(plugin)) |