Răsfoiți Sursa

Merge branch 'master' into rc/1.0.x

Yuki Takei 9 ani în urmă
părinte
comite
9b35c32739

+ 1 - 1
Procfile

@@ -1 +1 @@
-web: node app.js
+web: npm run server:prod:container

+ 5 - 0
app.json

@@ -16,6 +16,11 @@
     "PASSWORD_SEED": {
       "description": "A password seed is used by password hash generator. ",
       "generator": "secret"
+    },
+    "INSTALL_PLUGINS": {
+      "description": "Comma-separated list of plugin package names to install.",
+      "value": "crowi-plugin-lsx",
+      "required": false
     }
   },
   "addons": [

+ 7 - 0
bin/heroku/install-plugins.sh

@@ -0,0 +1,7 @@
+#!/bin/sh
+
+export IFS=","
+
+for plugin in $INSTALL_PLUGINS; do
+  npm install --save $plugin
+done

+ 1 - 1
lib/crowi/index.js

@@ -256,7 +256,7 @@ Crowi.prototype.setupMailer = function() {
 Crowi.prototype.setupInterceptorManager = function() {
   var self = this;
   return new Promise(function(resolve, reject) {
-    const InterceptorManager = require('../util/interceptorManager');
+    const InterceptorManager = require('../util/interceptor-manager');
     self.interceptorManager = new InterceptorManager();
     resolve();
   });

+ 0 - 0
lib/util/interceptorManager.js → lib/util/interceptor-manager.js


+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "clean:js": "rimraf -- public/js",
     "clean:dll": "rimraf -- public/dll",
     "clean": "npm run clean:js && npm run clean:dll",
+    "heroku-postbuild": "sh bin/heroku/install-plugins.sh && npm run build:prod",
     "mkdirp": "mkdirp",
     "plugin:def": "node bin/generate-plugin-definitions-source.js",
     "prebuild:dev": "env-cmd config/env.dev.js npm run plugin:def",

+ 1 - 1
resource/js/legacy/crowi.js

@@ -440,7 +440,7 @@ $(function() {
         })
         .then(() => crowi.interceptorManager.process('postPreProcess', context))
         .then(() => {
-          var parsedHTML = crowiRenderer.parseMarkdown(context.markdown, rendererOptions);
+          var parsedHTML = crowiRenderer.render(context.markdown, rendererOptions);
           context.parsedHTML = parsedHTML;
           Promise.resolve(context);
         })

+ 2 - 2
resource/js/util/Crowi.js

@@ -3,11 +3,11 @@
  */
 
 import axios from 'axios'
-import InterceptorManager from '../../../lib/util/interceptorManager';
+import InterceptorManager from '../../../lib/util/interceptor-manager';
 import {
   DetachCodeBlockInterceptor,
   RestoreCodeBlockInterceptor,
-} from './Interceptor/DetachCodeBlock';
+} from './interceptor/detach-code-blocks';
 
 export default class Crowi {
   constructor(context, window) {

+ 0 - 0
resource/js/util/Interceptor/DetachCodeBlock.js → resource/js/util/interceptor/detach-code-blocks.js