After some more code digging and experiments I can answer my own question. A theme is a normal plugin and as such does not inherit any behavior from other plugins.
So you need to copy everything you need from the base theme library.js to your child theme. And of course, you need to declare client scripts explicitly.
Loading of missing templates from base theme is the only link between the base and the child theme.
Problem when trying to call masonry js library in plugin.json
-
I have a problem with implementing a masonry library script into my theme. I followed this https://github.com/NodeBB/nodebb-theme-lavender/blob/master/plugin.json to see how it should be done. Of course I changed "lavender" to "my theme name". So now my files looks like this:
- plugin.json http://screencast.com/t/LcPwNv5g
- theme.json http://screencast.com/t/juwjCrtfJQ
The problem is that my site then crashes. And it says that the problem is
unexpected token }
http://screencast.com/t/QXeJAsgwF and that is weird because I never changed those files. -
Remove the comma at the end of the template line in your theme.json file
"templates": "templates"
-
@a_5mith and once again you saved my day, tnx.
I had to remove coma in plugin.json too on last line
"static/vendor/masonry.js"
but yes, commas were problem.^^ -
@Jelena You're welcome, didn't look in the plugin file.
glad you've got it working,