فهرست منبع

WIP: remove unnecessary packages

Yuki Takei 7 سال پیش
والد
کامیت
2a090b02bd

+ 4 - 17
packages/growi-plugin-lsx/package.json

@@ -6,19 +6,11 @@
     "growi",
     "growi-plugin"
   ],
-  "main": "lib/index.js",
+  "main": "src/index.js",
   "files": [
-    "lib", "src"
+    "src"
   ],
   "scripts": {
-    "build:watch": "npm run build -- --watch",
-    "build": "babel src --out-dir lib --source-maps inline",
-    "clean": "npm run rimraf -- lib",
-    "resources": "mkdirp lib/resource/css && ncp src/resource/css lib/resource/css",
-    "prebuild:watch": "npm run clean && npm run resources",
-    "prebuild": "npm run resources",
-    "prepublish": "npm run clean && npm run resources && npm run build",
-    "rimraf": "rimraf",
     "test": ""
   },
   "repository": "https://github.com/weseek/growi-plugin-lsx.git",
@@ -30,23 +22,18 @@
   "homepage": "https://github.com/weseek/growi-plugin-lsx#readme",
   "dependencies": {
     "growi-pluginkit": "^1.1.0",
-    "react": "^16.2.0",
-    "react-dom": "^16.2.0",
     "url": "^0.11.0"
   },
   "devDependencies": {
-    "babel-cli": "^6.24.1",
     "babel-preset-env": "^1.6.0",
     "babel-preset-power-assert": "^2.0.0",
     "babel-preset-react": "^6.24.1",
-    "babel-register": "^6.23.0",
     "eslint": "^5.9.0",
     "eslint-plugin-react": "^7.11.1",
-    "mkdirp": "^0.5.1",
     "mocha": "^5.0.4",
-    "ncp": "^2.0.0",
     "power-assert": "^1.4.2",
-    "rimraf": "^2.6.1"
+    "react": "^16.2.0",
+    "react-dom": "^16.2.0"
   },
   "engines": {
     "node": ">=8.11.1 <9",

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

@@ -206,7 +206,7 @@ export class Lsx extends React.Component {
   }
 
   render() {
-    return <div className="lsx">{this.renderContents()}</div>
+    return <div className="lsx">{this.renderContents()}</div>;
   }
 }
 

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

@@ -4,7 +4,6 @@ import ReactDOM from 'react-dom';
 import { BasicInterceptor } from 'growi-pluginkit';
 
 import { Lsx } from '../../components/Lsx';
-import { LsxContext } from '../LsxContext';
 import { LsxCacheHelper } from '../LsxCacheHelper';
 
 /**

+ 14 - 12
packages/growi-plugin-lsx/src/resource/js/util/LsxContext.js

@@ -2,15 +2,17 @@ import * as url from 'url';
 
 export class LsxContext {
 
-  currentPagePath;
-  tagExpression;
-  fromPagePath;
-  lsxArgs;
-
-  // initialized after parse()
-  isParsed;
-  pagePath;
-  options;
+  constructor() {
+    this.currentPagePath = null;
+    this.tagExpression = null;
+    this.fromPagePath = null;
+    this.lsxArgs = null;
+
+    // initialized after parse()
+    this.isParsed = null;
+    this.pagePath = null;
+    this.options = null;
+  }
 
   parse() {
     if (this.isParsed) {
@@ -60,8 +62,8 @@ export class LsxContext {
     //   when `fromPagePath`=/hoge and `specifiedPath`=undefined,
     //        `pagePath` to be /hoge
     this.pagePath = (specifiedPath !== undefined) ?
-        decodeURIComponent(url.resolve(this.addSlashOfEnd(this.fromPagePath), specifiedPath)):
-        this.fromPagePath;
+      decodeURIComponent(url.resolve(this.addSlashOfEnd(this.fromPagePath), specifiedPath)):
+      this.fromPagePath;
 
     this.isParsed = true;
   }
@@ -86,7 +88,7 @@ export class LsxContext {
     if (this.options.depth == undefined) {
       return undefined;
     }
-    return this.parseNum(this.options.depth)
+    return this.parseNum(this.options.depth);
   }
 
   parseNum(str) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 7 - 643
packages/growi-plugin-lsx/yarn.lock


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است