I change a pattern in plone mockup.. what is next step?

Hi everyone,

I'm creating a pull request that requires a change in one of the mockup patterns.

After finish the changes, I can only see it in action in development mode.. what should I do to put my change in action without development mode?

I tryied the make bundles or make all at mockup package, but nothing happens.

Also, this information should be available in mockup readme, don't you think?

@jensens pointed that it was somehow tied with Products.CMFPlone, then I found this documentation https://github.com/plone/Products.CMFPlone/blob/master/DEVELOPING_BUNDLES.rst

Consider please to point this documentation in mockup readme.

I got a traceback here when I run the command ./bin/plone-compile-resources (pointed in the docs).

I suspect that I'm using the wrong version of nodejs.. can someone tell me what version of nodejs should I use?

Use the current stable node js release - 4.6.0. I run with a more current one without much problems (6.2.2).
You can manage different node js versions with the nvm tool: https://github.com/creationix/nvm

1 Like

I use ndenv tool provided by anyenv https://github.com/riywo/anyenv

@thet is it normal to get this traceback when I don't inform the bundle?

$ ./bin/plone-compile-resources
...
...
...
Running "less:thememapper" (less) task
>> NameError: variable @barcelonetaPath is undefined in /srv/buildout.coredev/src/plone.app.theming/src/plone/app/theming/browser/resources/thememapper.less on line 5, column 25:
>> 4 @import url("@{staticPath}/patterns/toolbar/src/css/variables.less");
>> 5 @import (reference) url("@{barcelonetaPath}/less/variables.plone.less");
>> 6 @import (reference) url("@{barcelonetaPath}/less/mixin.font.plone.less");
Warning: Error compiling /srv/buildout.coredev/src/plone.app.theming/src/plone/app/theming/browser/resources/thememapper.less Use --force to continue.

Aborted due to warnings.
Traceback (most recent call last):
  File "./bin/plone-compile-resources", line 300, in <module>
    sys.exit(Products.CMFPlone._scripts.compile_resources.main())
  File "/srv/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/_scripts/compile_resources.py", line 172, in main
    subprocess.check_call(cmd)
  File "/srv/env/pyenv/versions/2.7.9/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/srv/buildout.coredev/node_modules/grunt-cli/bin/grunt', '--gruntfile=/srv/buildout.coredev/Gruntfile.js', 'compile-all']' returned non-zero exit status 6

It's not normal but I just confirmed the same error with fresh Plone site and buildout.coredev. It seems to be related to the thememapper bundle only (plone and plone-logged-in compile correctly).

The generated Gruntfile.js doesn't include the barcelonetaPath variable as it should per this commit: https://github.com/plone/Products.CMFPlone/commit/8a404a4ab081b7544301523c457405d77c96973a

It was removed in 291477e909660b795f53b6ab1c372c97f0812857. Maybe an accident? I left a comment asking.

On a sidenote I can successfully build that bundle TTW (using @@resourceregistry-controlpanel).