Преглед на файлове

use crowi-pluginkit from npm

Yuki Takei преди 9 години
родител
ревизия
165a4d33cc

+ 1 - 0
packages/growi-plugin-lsx/package.json

@@ -26,6 +26,7 @@
   },
   },
   "homepage": "https://github.com/yuki-takei/crowi-plugin-lsx#readme",
   "homepage": "https://github.com/yuki-takei/crowi-plugin-lsx#readme",
   "dependencies": {
   "dependencies": {
+    "crowi-pluginkit": "^1.0.1",
     "react": "^15.4.2",
     "react": "^15.4.2",
     "react-dom": "^15.4.2"
     "react-dom": "^15.4.2"
   },
   },

+ 0 - 47
packages/growi-plugin-lsx/src/lib/util/BasicInterceptor.js

@@ -1,47 +0,0 @@
-/**
- * Basic Interceptor class
- */
-class BasicInterceptor {
-
-  /**
-   * getter for id
-   */
-  getId() {
-    return this.constructor.name;
-  }
-
-  /**
-   * return whether this interceptor works by specified contextName
-   *
-   * @param {string} contextName
-   * @return {boolean}
-   */
-  isInterceptWhen(contextName) {
-    // implement this
-    return false;
-  }
-
-  /**
-   * return whether this interceptor processes in parallel mode or sequencial mode
-   * @return {boolean}
-   */
-  isProcessableParallel() {
-    // implement this
-    return true;
-  }
-
-  /**
-   * process method
-   *
-   * @param {string} contextName
-   * @param {any} args
-   * @return {Promise}
-   */
-  process(contextName, ...args) {
-    // override this
-    return Promise.resolve(...args);
-  }
-
-}
-
-module.exports = BasicInterceptor;

+ 1 - 1
packages/growi-plugin-lsx/src/resource/js/util/Interceptor/LsxPostRenderInterceptor.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import React from 'react';
 import ReactDOM from 'react-dom';
 import ReactDOM from 'react-dom';
 
 
-import BasicInterceptor from '../../../../lib/util/BasicInterceptor';
+import { BasicInterceptor } from 'crowi-pluginkit';
 
 
 import { Lsx } from '../../components/Lsx';
 import { Lsx } from '../../components/Lsx';
 import { LsxContext } from '../LsxContext';
 import { LsxContext } from '../LsxContext';

+ 1 - 1
packages/growi-plugin-lsx/src/resource/js/util/Interceptor/LsxPreRenderInterceptor.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import React from 'react';
 import ReactDOM from 'react-dom';
 import ReactDOM from 'react-dom';
 
 
-import BasicInterceptor from '../../../../lib/util/BasicInterceptor';
+import { BasicInterceptor } from 'crowi-pluginkit';
 
 
 import { Lsx } from '../../components/Lsx';
 import { Lsx } from '../../components/Lsx';
 import { LsxContext } from '../LsxContext';
 import { LsxContext } from '../LsxContext';