Hi, I would like to rebuild the app including some modification to a file in order to disable the search feature for anonymous users.(more than with just css)
Can anyone provide me some documentation for the syntax of those hooks for the from: & to: part?
- replace:
filename: "/var/www/discourse/app/assets/javascripts/discourse/app/components/search-menu.js"
from: /get classNames()/
to: |
if (!this.currentUser) {return false;} get classNames()
Discourse accepts the syntax now but at the end of the rebuild it fails with
Error: Parse Error at discourse/components/search-menu.gjs:88:7"
replace failed with the params {"filename"=>"/var/www/discourse/app/assets/javascripts/discourse/app/components/search-menu.gjs", "from"=>"/get classNames()/", "to"=>"if (!this.currentUser) {return false;} get classNames()\n"}