I am working on the new theme using webpack building css and js. There is no problems to work with styling sass/css, but the theme doesn't read js files after builded webpack. Is there way to get this?
I am trying to use packages and modules from the npm registry to generate the css and js needed for my theme. I use webpack to manage packages and get .css and .js output files. According to the developer documentation https://docs.backdropcms.org/documentation/creating-sub-themes I need to add files style sheets [all] [] = mystyle.css
and scripts [] = myscript.js
to the .info file. And it works correctly for both of them if I use a standalone js file. But the js file I get as output from webpack is not. This works for Drupal 9, so I thought it might work for Backdrop too. Let me know if I'm wrong.
I agree with BWPanda about the better way to add a filter. As for your general question on how to add an array to a config file (which gets stored as json), have you tried:
$config = config('...
I think that directly editing config is rarely, if ever, the best way to do something...
Perhaps try loading a format (with it's filters) using filter_format_load(), add the new filter array (by...
Posted3 hours 52 min ago by Peter Anderson (BWPanda) on:
My initial goal was to create a menu item that linked to a view that I had configured and that was being created on installation of the module, by including the view config file.
To do this, I just...
Yep, node_save() is just a wrapper for $node->save(). This is because the latter is Object-Oriented Programming (OOP), and a lot of people aren't as familiar with that. So the former can be used...
Posted2 days 7 hours ago by Peter Anderson (BWPanda) on:
Seems that they must be the same thing.
https://docs.backdropcms.org/api/backdrop/core%21modules%21node%21node.m...
I am wondering now if the different behavior I experienced was impacted by other...
Comments
I am not sure that I understand the question?
Are you building a new theme for Backdrop?
Can you provide a little more information about the specifics of your problem?
I am trying to use packages and modules from the npm registry to generate the css and js needed for my theme. I use webpack to manage packages and get .css and .js output files. According to the developer documentation https://docs.backdropcms.org/documentation/creating-sub-themes I need to add files
style sheets [all] [] = mystyle.css
and
scripts [] = myscript.js
to the .info file. And it works correctly for both of them if I use a standalone js file. But the js file I get as output from webpack is not. This works for Drupal 9, so I thought it might work for Backdrop too. Let me know if I'm wrong.