Skip to content

Commit

Permalink
Rename the server side widget hbs compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Mar 27, 2020
1 parent 38e347a commit b2b7afd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/discourse_js_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def self.create_new_context
}
JS
source = File.read("#{Rails.root}/lib/javascripts/widget-hbs-compiler.js.es6")
source = File.read("#{Rails.root}/lib/javascripts/widget-hbs-compiler.js")
js_source = ::JSON.generate(source, quirks_mode: true)
js = ctx.eval("Babel.transform(#{js_source}, { ast: false, plugins: ['check-es2015-constants', 'transform-es2015-arrow-functions', 'transform-es2015-block-scoped-functions', 'transform-es2015-block-scoping', 'transform-es2015-classes', 'transform-es2015-computed-properties', 'transform-es2015-destructuring', 'transform-es2015-duplicate-keys', 'transform-es2015-for-of', 'transform-es2015-function-name', 'transform-es2015-literals', 'transform-es2015-object-super', 'transform-es2015-parameters', 'transform-es2015-shorthand-properties', 'transform-es2015-spread', 'transform-es2015-sticky-regex', 'transform-es2015-template-literals', 'transform-es2015-typeof-symbol', 'transform-es2015-unicode-regex'] }).code")
ctx.eval(js)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion script/compile_hbs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
JS
source = File.read("#{Rails.root}/lib/javascripts/widget-hbs-compiler.js.es6")
source = File.read("#{Rails.root}/lib/javascripts/widget-hbs-compiler.js")
js_source = ::JSON.generate(source, quirks_mode: true)
js = ctx.eval("Babel.transform(#{js_source}, { ast: false, plugins: ['check-es2015-constants', 'transform-es2015-arrow-functions', 'transform-es2015-block-scoped-functions', 'transform-es2015-block-scoping', 'transform-es2015-classes', 'transform-es2015-computed-properties', 'transform-es2015-destructuring', 'transform-es2015-duplicate-keys', 'transform-es2015-for-of', 'transform-es2015-function-name', 'transform-es2015-literals', 'transform-es2015-object-super', 'transform-es2015-parameters', 'transform-es2015-shorthand-properties', 'transform-es2015-spread', 'transform-es2015-sticky-regex', 'transform-es2015-template-literals', 'transform-es2015-typeof-symbol', 'transform-es2015-unicode-regex'] }).code")
ctx.eval(js)
Expand Down
2 changes: 1 addition & 1 deletion script/test_hbs_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
JS
source = File.read("#{Rails.root}/lib/javascripts/widget-hbs-compiler.js.es6")
source = File.read("#{Rails.root}/lib/javascripts/widget-hbs-compiler.js")
ctx.eval(source)

js_source = ::JSON.generate(template, quirks_mode: true)
Expand Down

0 comments on commit b2b7afd

Please sign in to comment.