@@ -110,6 +110,7 @@
"start": "node app.js",
"test": "gulp test",
"build": "gulp",
+ "install-plugin": "npm -prefix ./plugin install -- ",
"webpack": "webpack",
"webpack:plugin": "webpack --config webpack.plugin.config.js",
"postinstall": "gulp"
@@ -1 +1,12 @@
-require('path');
+export default class CrowiPlugin {
+
+ constructor() {
+ }
+ getAllPreProcessors() {
+ return []
+}
+window.crowiPlugin = new CrowiPlugin(); // FIXME
@@ -21,6 +21,12 @@ export default class CrowiRenderer {
new Emoji(),
];
+ var isEnablePlugin = true; // TODO configurable
+ if (isEnablePlugin) {
+ var crowiPlugin = window.crowiPlugin;
+ this.preProcessors = this.preProcessors.concat(crowiPlugin.getAllPreProcessors());
this.langProcessors = {
'tsv': new Tsv2Table(),
'tsv-h': new Tsv2Table({header: true}),
@@ -21,7 +21,6 @@ var config = {
{
test: /.jsx?$/,
loader: 'babel-loader',
- exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}