FEATURE: add JavaScript mode to ace (#27586)

This allows plugins to use Ace Editor in JavaScript mode. This will be used in Discourse AI when defining custom tools.
This commit is contained in:
Sam
2024-06-24 13:38:24 +10:00
committed by GitHub
parent 4cbe5e0606
commit cb3456e18f
4 changed files with 30 additions and 3 deletions

View File

@ -250,9 +250,15 @@ task "javascript:update" => "clean_up" do
ace_root = "#{library_src}/ace-builds/src-min-noconflict/"
addtl_files = %w[ext-searchbox mode-html mode-scss mode-sql mode-yaml worker-html].concat(
themes,
)
addtl_files = %w[
ext-searchbox
mode-html
mode-javascript
mode-scss
mode-sql
mode-yaml
worker-html
].concat(themes)
dest_path = dest.split("/")[0..-2].join("/")
addtl_files.each { |file| FileUtils.cp_r("#{ace_root}#{file}.js", dest_path) }