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:
parent
a78b256e8b
commit
5e5973cabe
|
@ -193,7 +193,9 @@ task 'javascript:update' do
|
||||||
system("rm -rf node_modules/highlight.js/build/styles")
|
system("rm -rf node_modules/highlight.js/build/styles")
|
||||||
|
|
||||||
langs_dir = 'vendor/assets/javascripts/highlightjs/languages/*.min.js'
|
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'
|
test_bundle_dest = 'vendor/assets/javascripts/highlightjs/highlight-test-bundle.min.js'
|
||||||
File.write(test_bundle_dest, HighlightJs.bundle(langs))
|
File.write(test_bundle_dest, HighlightJs.bundle(langs))
|
||||||
end
|
end
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue