FIX: Our test build of highlight.js was broken

Some definitions rely on others, in particular the c/cpp/c-like ones,
and we were appending the bundle of all files in the folder.

Instead for testing I've limited us to just three definitions. This has
the benefit of being a lot smaller to download/parse in test mode too.
This commit is contained in:
Robin Ward 2020-07-20 15:34:24 -04:00
parent a78b256e8b
commit 5e5973cabe
2 changed files with 4 additions and 191 deletions

View File

@ -193,7 +193,9 @@ task 'javascript:update' do
system("rm -rf node_modules/highlight.js/build/styles")
langs_dir = 'vendor/assets/javascripts/highlightjs/languages/*.min.js'
langs = Dir.glob(langs_dir).map { |lang| File.basename(lang).split('.')[0] }
# We don't need every language for tests
langs = ['javascript', 'sql', 'ruby']
test_bundle_dest = 'vendor/assets/javascripts/highlightjs/highlight-test-bundle.min.js'
File.write(test_bundle_dest, HighlightJs.bundle(langs))
end

File diff suppressed because one or more lines are too long