From 82c16998cdc4c959f7abd7266c182c3c73e29cc6 Mon Sep 17 00:00:00 2001 From: Mickael Jeanroy Date: Tue, 15 Jan 2019 00:09:47 +0100 Subject: [PATCH] chore: remove unused code --- src/index-rollup-stable.js | 17 +---------------- src/license-plugin.js | 6 ------ 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/index-rollup-stable.js b/src/index-rollup-stable.js index cff3b6fd..77415cf8 100644 --- a/src/index-rollup-stable.js +++ b/src/index-rollup-stable.js @@ -24,25 +24,10 @@ 'use strict'; -const _ = require('lodash'); const LicensePlugin = require('./license-plugin.js'); module.exports = (options = {}) => { - // Rollup <= 0.48 used `sourceMap` in camelcase, so this plugin used - // this convention at the beginning. - // Now, the `sourcemap` key should be used, but legacy version should still - // be able to use the `sourceMap` key. - const newOptions = _.omitBy(options, (value, key) => ( - key === 'sourceMap' - )); - - // If the old `sourceMap` key is used, set it to `sourcemap` key. - if (!_.hasIn(newOptions, 'sourcemap') && _.hasIn(options, 'sourceMap')) { - console.warn(`[${LicensePlugin.NAME}] sourceMap has been deprecated, please use sourcemap instead.`); - newOptions.sourcemap = options.sourceMap; - } - - const plugin = new LicensePlugin(newOptions); + const plugin = new LicensePlugin(options); return { /** diff --git a/src/license-plugin.js b/src/license-plugin.js index fcad098b..0b6d784a 100644 --- a/src/license-plugin.js +++ b/src/license-plugin.js @@ -326,10 +326,4 @@ class LicensePlugin { } } -/** - * Export the plugin name as static property. - * @type {string} - */ -LicensePlugin.NAME = PLUGIN_NAME; - module.exports = LicensePlugin;