From ce2b200fd24d318c3970466620c44630b735803b Mon Sep 17 00:00:00 2001 From: Marco Dickert Date: Tue, 20 Mar 2018 17:26:50 +0100 Subject: [PATCH 1/4] Added ability to include ace extensions, like syntax highlighting and other features --- .gitattributes | 1 + .gitignore | 1 + build/libifm.php | 141 ++++++++++++++------ compiler.php | 50 +++++-- ifm.php | 141 ++++++++++++++------ src/ifm.js | 48 +++++-- src/includes/ace.js | 2 +- src/main.php | 31 +++-- src/templates/modal.file_editoroptions.html | 7 + 9 files changed, 304 insertions(+), 118 deletions(-) diff --git a/.gitattributes b/.gitattributes index 7635ed6..50b6f6d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ ifm.php -diff ifm.min.php -diff build/* -diff +src/includes/ace.js -diff diff --git a/.gitignore b/.gitignore index bdcb013..75a763a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .*.swp *.zip misc +src/includes/ace/* diff --git a/build/libifm.php b/build/libifm.php index ff72e41..0ae2247 100644 --- a/build/libifm.php +++ b/build/libifm.php @@ -104,6 +104,12 @@ class IFM { // load config from passed array $this->config = array_merge( $this->config, $config ); + // get list of ace includes + $this->config['ace_includes'] = <<<'f00bar' +|ext-modelist|mode-html|mode-html_elixir|mode-html_ruby|mode-perl|mode-php +f00bar; + + // templates $templates = array(); $templates['app'] = <<<'f00bar'