File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 MIT License http://www.opensource.org/licenses/mit-license.php
33 Author Tobias Koppers @sokra
44*/
5- function AbstractPlugin ( plugins ) {
6- this . _plugins = plugins || { } ;
7- }
8- module . exports = AbstractPlugin ;
5+ "use strict" ;
6+
7+ class AbstractPlugin {
8+ static create ( plugins ) {
9+ return class Plugin extends AbstractPlugin {
10+ constructor ( ) {
11+ super ( plugins ) ;
12+ }
13+ } ;
14+ }
915
10- AbstractPlugin . create = function ( plugins ) {
11- function Plugin ( ) {
12- AbstractPlugin . call ( this , plugins ) ;
16+ constructor ( plugins ) {
17+ this . _plugins = plugins || { } ;
1318 }
14- Plugin . prototype = Object . create ( AbstractPlugin . prototype ) ;
15- return Plugin ;
16- } ;
1719
18- AbstractPlugin . prototype . apply = function ( object ) {
19- for ( var name in this . _plugins ) {
20- object . plugin ( name , this . _plugins [ name ] ) ;
20+ apply ( object ) {
21+ for ( const name in this . _plugins ) {
22+ object . plugin ( name , this . _plugins [ name ] ) ;
23+ }
2124 }
22- } ;
25+ }
26+
27+ module . exports = AbstractPlugin ;
You can’t perform that action at this time.
0 commit comments