I've created an addon with a theme_barceloneta with bobtemplates.plone.
I expected to get a working theme that we can edit and customize.
But after activating the theme Plone renders unstyled and the created theme is not editable
@yurj: I'm on Plone 5.2.6 with bobtemplates.plone==5.2.1.
There are two package.json files. None of them contains any scripts:
./my.package/package.json
{
"//": "Put here only devDependencies, theme dependencies should stay inside of the theme folder.",
"name": "my.package",
"version": "1.0.0",
"devDependencies": {
"grunt": "~0.4.4",
"grunt-browser-sync": "^2.2.0",
"grunt-contrib-less": "latest",
"grunt-contrib-watch": "latest",
"grunt-postcss": "^0.8.0",
"pixrem": "^3.0.2",
"cssnano": "^3.7.7",
"autoprefixer": "^6.5.1"
}
}
./my.package/src/my/package/theme/package.json
{
"//": "Put here only theme dependencies, devDependencies should stay outside of the theme folder in the package root.",
"name": "my.package",
"version": "1.0.0",
"dependencies": {
"bootstrap": "^3.3.7"
}
}
You can compile them from command line. I don't know why the compiled version is not included, maybe it is compiled at theme activation or addon install? @MrTango
If you built your addon with bobtemplates.plone, executing grunt (see preparations link on how to install it) in the package root folder should compile all your resources.
grunt compile warns (and avoids compiling) because the expression round((@plone-line-height-computed - 1) / 2) in file theme/barceloneta/less/code.plone.less cannot be evaluated. I added additional parentheses for grunt to compile (see below).
Unfortunately the barceloneta less files do not match with the installed version (Plone 5.2.6).
Is there any documentation of which version of barceloneta was used? It would be nice to document it in future versions of bobtemplates.plone.
For the sake of completeness I add here the steps that I needed to get it running:
If you build something new @yurj is right, use the bobtemplates.plone 6.x version which are currently in beta. They will use the npm package of barceloneta and are more up to date.
This error came up earlier too, but it is not fixed in the older versions. I'm happy to review a pull request for the 5.x branch of bobtemplates.plone, so that other people who want to use the older versions which are supporting Python 2.7, don't have the same issues.