Yuki Takei 7 лет назад
Родитель
Сommit
4d0aead30b

+ 2 - 2
packages/growi-plugin-lsx/src/client-entry.js

@@ -1,5 +1,5 @@
-import { LsxPreRenderInterceptor } from './resource/js/util/Interceptor/LsxPreRenderInterceptor';
-import { LsxPostRenderInterceptor } from './resource/js/util/Interceptor/LsxPostRenderInterceptor';
+import { LsxPreRenderInterceptor } from './client/js/util/Interceptor/LsxPreRenderInterceptor';
+import { LsxPostRenderInterceptor } from './client/js/util/Interceptor/LsxPostRenderInterceptor';
 
 module.exports = (crowi, crowiRenderer) => {
   // add interceptors

+ 0 - 0
packages/growi-plugin-lsx/src/resource/css/index.css → packages/growi-plugin-lsx/src/client/css/index.css


+ 1 - 1
packages/growi-plugin-lsx/src/resource/js/components/Lsx.jsx → packages/growi-plugin-lsx/src/client/js/components/Lsx.jsx

@@ -174,7 +174,7 @@ export class Lsx extends React.Component {
    * @memberOf Lsx
    */
   isEquals(path1, path2) {
-    return this.addSlashOfEnd(path1) === this.addSlashOfEnd(path2)
+    return this.addSlashOfEnd(path1) === this.addSlashOfEnd(path2);
   }
 
   getParentPath(path) {

+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/components/LsxPageList/LsxListView.jsx → packages/growi-plugin-lsx/src/client/js/components/LsxPageList/LsxListView.jsx


+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/components/LsxPageList/LsxPage.jsx → packages/growi-plugin-lsx/src/client/js/components/LsxPageList/LsxPage.jsx


+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/components/LsxPageList/PagePathWrapper.jsx → packages/growi-plugin-lsx/src/client/js/components/LsxPageList/PagePathWrapper.jsx


+ 2 - 2
packages/growi-plugin-lsx/src/resource/js/components/PageNode.js → packages/growi-plugin-lsx/src/client/js/components/PageNode.js

@@ -38,8 +38,8 @@ export class PageNode {
     // instanciate recursively
     pageNode.children = obj.children.map((childObj) => {
       return PageNode.instanciateFrom(childObj);
-    })
+    });
 
-    return pageNode
+    return pageNode;
   }
 }

+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/util/Interceptor/LsxPostRenderInterceptor.js → packages/growi-plugin-lsx/src/client/js/util/Interceptor/LsxPostRenderInterceptor.js


+ 3 - 3
packages/growi-plugin-lsx/src/resource/js/util/Interceptor/LsxPreRenderInterceptor.js → packages/growi-plugin-lsx/src/client/js/util/Interceptor/LsxPreRenderInterceptor.js

@@ -97,9 +97,9 @@ export class LsxPreRenderInterceptor extends BasicInterceptor {
    * @return random strings
    */
   createRandomStr(length) {
-    const bag = "abcdefghijklmnopqrstuvwxyz0123456789";
-    let generated = "";
-    for (var i = 0; i < length; i++) {
+    const bag = 'abcdefghijklmnopqrstuvwxyz0123456789';
+    let generated = '';
+    for (let i = 0; i < length; i++) {
       generated += bag[Math.floor(Math.random() * bag.length)];
     }
     return generated;

+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/util/LsxCacheHelper.js → packages/growi-plugin-lsx/src/client/js/util/LsxCacheHelper.js


+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/util/LsxContext.js → packages/growi-plugin-lsx/src/client/js/util/LsxContext.js


+ 1 - 1
packages/growi-plugin-lsx/src/meta.js

@@ -8,4 +8,4 @@ module.exports = {
   clientEntries: [
     path.join(__dirname, 'client-entry.js')
   ]
-}
+};

+ 2 - 2
packages/growi-plugin-lsx/src/server-entry.js

@@ -1,4 +1,4 @@
 module.exports = (crowi, app) => {
   // add routes
-  require('./lib/routes')(crowi, app);
-}
+  require('./server/routes')(crowi, app);
+};

+ 2 - 2
packages/growi-plugin-lsx/src/lib/routes/index.js → packages/growi-plugin-lsx/src/server/routes/index.js

@@ -1,5 +1,5 @@
 module.exports = (crowi, app) => {
-  var debug = require('debug')('growi-plugin:lsx:routes')
+  let debug = require('debug')('growi-plugin:lsx:routes')
     , middleware = crowi.require('../util/middlewares')
     , lsx = require('./lsx')(crowi, app)
     , loginRequired = middleware.loginRequired
@@ -9,4 +9,4 @@ module.exports = (crowi, app) => {
 
   // app.get('/_api/plugins/lsx', accessTokenParser , loginRequired(crowi, app) , lsx.renderHtml);
   app.get('/_api/plugins/lsx', lsx.listPages);
-}
+};

+ 0 - 0
packages/growi-plugin-lsx/src/lib/routes/lsx.js → packages/growi-plugin-lsx/src/server/routes/lsx.js


+ 0 - 0
packages/growi-plugin-lsx/src/lib/util/option-parser.js → packages/growi-plugin-lsx/src/server/util/option-parser.js