Skip to content

Commit

Permalink
Update mockup
Browse files Browse the repository at this point in the history
- Align bower components with newest mockup + documentation updates on mockup update process.
- Ignore a bit more in .gitignores for CMPlones bower components.
- Add missing jquery.browser dependency which is needed by patternslib.
- Remove deprecated resource registrations for ``mockup-parser`` and ``mockup-registry`` from mockup-core.
  Use those from patternslib instead.
  • Loading branch information
thet committed Jun 23, 2016
1 parent fb807e3 commit 56147f7
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 122 deletions.
14 changes: 14 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Changelog

Breaking changes:

- Remove deprecated resource registrations for ``mockup-parser`` and ``mockup-registry`` from mockup-core.
Use those from patternslib instead.
[thet]

- ``plone-compile-resources``: Install ``grunt-cli`` instead of depending on an installed ``grunt`` executable.
If you already have a auto-generated ``package.json`` file in buildout directory, remove it.
[thet]
Expand All @@ -24,6 +28,12 @@ Breaking changes:

New features:

- Align bower components with newest mockup + documentation updates on mockup update process.
[thet]

- Ignore a bit more in ``.gitignores`` for CMPlones bower components.
[thet]

- Added setting to editing controlpanel to enable limit of keywords to the current navigation root.
[jensens]

Expand All @@ -32,6 +42,7 @@ New features:

- Add link to training.plone.org
[svx]

- Allow to define multiple ``tinymce-content-css`` in theme ``manifest.cfg`` files, seperated by a comma.
[thet]

Expand All @@ -51,6 +62,9 @@ New features:

Bug fixes:

- Add missing ``jquery.browser`` dependency which is needed by patternslib.
[thet]

- Toolbar fixes:
- Autoformat with cssbrush and js-beautify,
- Remove ``git diff`` in line 105, which broke compilation.
Expand Down
28 changes: 22 additions & 6 deletions DEVELOPING_BUNDLES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ Updating bundle resources
-------------------------

If you are updating Plone JavaScript resource while in development mode on your Plone instance, you'll need to compile those changes in order for Plone to be shipped with your changes in production mode.
The general process is...
The general process is:

1) make your updates to JavaScript (could be in mockup project)
2) compile bundle you made changes to::
1) Make your updates to JavaScript (could be in mockup project)
2) Compile bundle you made changes to::

cd path/to/buildout
./bin/plone-compile-resources --bundle=bundle-name

3) In the ``registry.xml`` file where the bundle is registered, update the bundles ``last_compilation`` date/time value.
Otherwise there might still an old, cached version be delivered.

4) If you update one of the core bundles (e.g. ``plone`` or ``plone-logged-in``) don't forget to add an registry entry with updated ``last_compilation`` in ``plone.app.upgrade`` too.

The final step requires you to have a clean Plone instance available which knows how to build the JavaScript dependencies.
You can provide `--instance` parameter to customize which Plone instance is used to build the bundle.
Expand All @@ -41,14 +45,26 @@ Upgrading JavaScript library

If you need to update a dependent version, the general workflow is:

1) update Products.CMFPlone/static/bower.json
2) run bower in Products.CMFPlone/static::
1) Update Products.CMFPlone/static/bower.json
2) Run bower in Products.CMFPlone/static::

cd path/to/Products/CMFPlone/static
path/to/bower install

3) then, finally, compile bundle::
3) Then, finally, compile the bundle::

cd path/to/buildout
./bin/plone-compile-resources --bundle=bundle-name

To get it as clean as possible without any unnecessary files, follow a similar process like this::

1) Copy ``bower.json``, ``.bowerrc`` and ``.gitignore`` to a new temporary working directory, which is not already managed by git.
2) Update ``bower.json`` in there.
3) Run ``bower install`` in there.
4) Eventually update ``.gitignore`` to ignore any new files not needed to build other bundles.
5) Run ``git init .``
6) Run ``git add .``
7) Remove the ``components`` directory in the temporary working directory.
8) Run ``git checkout .`` to checkout the components directory again, but this time only those files which ``.gitignore`` didn't ignore.
9) Replace ``static/components`` directory from CMFPlone with the ``components`` directory from your temporary working directory.

2 changes: 1 addition & 1 deletion Products/CMFPlone/profiles/dependencies/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
<version>3.1</version>
<version>4</version>
<dependencies>
<dependency>profile-Products.CMFFormController:CMFFormController</dependency>
<dependency>profile-Products.MimetypesRegistry:MimetypesRegistry</dependency>
Expand Down
17 changes: 7 additions & 10 deletions Products/CMFPlone/profiles/dependencies/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,6 @@
</record>

<!-- mockup core reqs -->
<records prefix="plone.resources/mockup-registry"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/components/mockup-core/js/registry.js</value>
</records>
<records prefix="plone.resources/mockup-parser"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/components/mockup-core/js/parser.js</value>
</records>
<records prefix="plone.resources/mockup-patterns-base"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++resource++mockup/base/pattern.js</value>
Expand Down Expand Up @@ -919,6 +911,11 @@
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/components/logging/src/logging.js</value>
</records>
<records prefix="plone.resources/jquery.browser"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/components/jquery.browser/dist/jquery.browser.js</value>
<value key="deps">jquery</value>
</records>


<!-- recurrence widget registrations -->
Expand Down Expand Up @@ -1058,7 +1055,7 @@
<value key="enabled">True</value>
<value key="jscompilation">++plone++static/plone-compiled.min.js</value>
<value key="csscompilation">++plone++static/plone-compiled.css</value>
<value key="last_compilation">2015-02-16 00:00:00</value>
<value key="last_compilation">2016-06-21 00:00:00</value>
<value key="stub_js_modules">
<element>jquery</element>
</value>
Expand All @@ -1074,7 +1071,7 @@
<value key="expression">python: member is not None</value>
<value key="jscompilation">++plone++static/plone-logged-in-compiled.min.js</value>
<value key="csscompilation">++plone++static/plone-logged-in-compiled.css</value>
<value key="last_compilation">2015-02-16 00:00:00</value>
<value key="last_compilation">2016-06-21 00:00:00</value>
<value key="depends">plone</value>
<value key="stub_js_modules">
<element>backbone</element>
Expand Down
151 changes: 66 additions & 85 deletions Products/CMFPlone/static/.gitignore
Original file line number Diff line number Diff line change
@@ -1,114 +1,95 @@
components/slides/
components/r.js/.*
components/spectrum/
components/prefixfree
components/patternslib/src/*.js
components/patternslib/src/legacy/*
components/patternslib/src/lib/*
components/patternslib/src/pat/*
components/patternslib/*.js
components/patternslib/tests/
components/patternslib/.*
components/patternslib/*.md
components/patternslib/*.txt
components/patternslib/Makefile
components/patternslib/bower.json
components/patternslib/demo/
components/patternslib/docs/
components/patternslib/jshintrc
components/patternslib/jshintrc-tests
components/patternslib/lib/
components/patternslib/package.json
components/ace-builds
components/**/*.coffee
components/**/*.map
components/**/*.md
components/**/*.sass
components/**/*.scss
components/**/*.yml
components/**/*bower.json
components/**/.*
components/**/Gemfile
components/**/Gruntfile.js
components/**/Makefile
components/**/coffeelint.json
components/**/component.json
components/**/examples
components/**/gulpfile.js
components/**/karma*
components/**/package.json
components/**/shims.json
components/**/test
components/**/tests
components/AnythingSlider/
components/ace-builds/demo/
components/ace-builds/src-min-noconflict/
components/ace-builds/src-min/
components/ace-builds/src-noconflict/
components/ace-builds/textarea/
components/almond/
components/bootstrap/grunt
components/chosen/
components/doc-ready/
components/eventEmitter/
components/eventie/
components/fullcalendar/
components/get-size/
components/get-style-property/
components/google-code-prettify/
components/imagesloaded/
components/jcrop/
components/jqtree/_entries
components/jqtree/_examples
components/jqtree/static
components/jquery-placeholder/
components/jquery-textchange/
components/jquery.recurrenceinput.js/*.rst
components/jquery.recurrenceinput.js/*.txt
components/jquery.recurrenceinput.js/.*
components/jquery.recurrenceinput.js/Screenshot*
components/jquery.recurrenceinput.js/demo/*
components/jquery.recurrenceinput.js/lib/*.gif
components/jquery.recurrenceinput.js/lib/*.png
components/jquery.recurrenceinput.js/lib/jquery-1.7.2.js
components/jquery.recurrenceinput.js/src/*.png
components/jquery.recurrenceinput.js/test*
components/jquery.tinymce/
components/klass/
components/less.js/
components/logging/.bower.json
components/logging/LICENSE.txt
components/logging/README.md
components/logging/bower.json
components/logging/changes.md
components/logging/grunt.js
components/logging/package.json
components/masonry/
components/matches-selector/
components/modernizr/
components/moment-timezone/
components/moment/src/lib/utils/abs-ceil.js
components/outlayer/
components/parsleyjs/
components/mockup-core/.nix/
components/mockup-core/CHANGES.rst
components/mockup-core/LICENSE.rst
components/mockup-core/tests/parser-test.js
components/r.js/build/tests/lib/nojQDupeDefine/
components/tinymce-builded/.eslintrc
components/tinymce-builded/.jscsrc
components/tinymce-builded/.jshintrc
components/tinymce-builded/Gruntfile.js
components/tinymce-builded/tests/.jshintrc
components/tinymce-builded/tools/saucelabs/
components/tinymce-builded/tools/tasks/
components/tinymce-builded/.gitignore
components/tinymce-builded/LICENSE.TXT
components/tinymce-builded/changelog.txt
components/tinymce-builded/package.json
components/tinymce-builded/tests/.eslintrc
components/tinymce-builded/tests/js/module_loader.js
components/tinymce-builded/tests/manual/dirty.html
components/tinymce-builded/tests/manual/dragdrop.html
components/tinymce-builded/tests/manual/imagetools.html
components/tinymce-builded/tests/manual/img/
components/tinymce-builded/tests/manual/inline-toolbars.html
components/tinymce-builded/tests/manual/skin.html
components/tinymce-builded/tests/tinymce/EditorUpload.js
components/tinymce-builded/tests/tinymce/data/
components/tinymce-builded/tests/tinymce/file/
components/tinymce-builded/tests

components/jquery.recurrenceinput.js/.*
components/jquery.recurrenceinput.js/*.rst
components/jquery.recurrenceinput.js/*.txt
components/jquery.recurrenceinput.js/Screenshot*
components/jquery.recurrenceinput.js/bower.json
components/jquery.recurrenceinput.js/demo/*
components/jquery.recurrenceinput.js/lib/jquery-1.7.2.js
components/jquery.recurrenceinput.js/lib/*.gif
components/jquery.recurrenceinput.js/lib/*.png
components/jquery.recurrenceinput.js/src/*.png
components/jquery.recurrenceinput.js/test*

components/pickadate/.gitignore
components/pickadate/.jshintrc
components/pickadate/.travis.yml
components/pickadate/Gruntfile.js
components/pickadate/bower.json
components/patternslib/*.js
components/patternslib/*.txt
components/patternslib/demo/
components/patternslib/docs/
components/patternslib/jshintrc
components/patternslib/jshintrc-tests
components/patternslib/lib/
components/patternslib/src/*.js
components/patternslib/src/legacy/*
components/patternslib/src/lib/*
components/patternslib/src/pat/*
components/patternslib/style/
components/photoswipe/
components/pickadate/lib/compressed
components/pickadate/lib/themes-source/
components/pickadate/package.json
components/pickadate/tests/
components/pickadate/version-bump.js
components/pickadate/version-commit.js

components/google-code-prettify/
components/moment/src/lib/utils/abs-ceil.js
components/patternslib/Gemfile
components/patternslib/_sass/
components/patternslib/style/
components/photoswipe/
components/pikaday/
components/prefixfree
components/requirejs-tpl-jcbrand/
components/showdown/
components/slides/
components/spectrum/
components/tinymce-builded/.eslintrc
components/tinymce-builded/.gitignore
components/tinymce-builded/.jscsrc
components/tinymce-builded/.jshintrc
components/tinymce-builded/LICENSE.TXT
components/tinymce-builded/changelog.txt
components/tinymce-builded/tools/saucelabs/
components/tinymce-builded/tools/tasks/
components/validate/

38 changes: 18 additions & 20 deletions Products/CMFPlone/static/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,40 @@
"version": "5.0b2",
"description": "CMFPlone Javascript Bundle",
"dependencies": {
"ace-builds": "1.1.9",
"ace-builds": "1.2.3",
"backbone": "1.1.2",
"backbone.paginator": "0.8.1",
"bootstrap": "3.3.4",
"console-polyfill": "0.1.2",
"dropzone": "4.0.1",
"es5-shim": "4.0.3",
"marked": "0.3.3",
"jqtree": "0.22.0",
"bootstrap": "3.3.6",
"console-polyfill": "0.2.2",
"dropzone": "4.3.0",
"es5-shim": "4.5.9",
"jqtree": "1.3.3",
"jquery": "1.11.3",
"jquery-form": "3.46.0",
"jquery.cookie": "1.4.1",
"jquery.recurrenceinput.js": "v1.5.2",
"logging": "",
"marked": "0.3.5",
"moment": "2.10.6",
"patternslib": "2.0.11",
"patternslib": "2.0.13",
"pickadate": "3.5.6",
"react": "0.10.0",
"requirejs-text": "2.0.12",
"requirejs-text": "2.0.15",
"select2": "3.5.4",
"selectivizr": "1.0.2",
"select2": "3.5.1",
"tinymce-builded": "4.3.4",
"tinymce-builded": "4.3.12",

This comment has been minimized.

Copy link
@davilima6

davilima6 Aug 1, 2016

Member

@thet, I think this TinyMCE upgrade deserves its own entry in changelog, similar to this one.

"requirejs": "",
"less": "2.1.2",
"r.js": "2.1.15"
},
"resolutions": {
"jquery": "1.11.3",
"select2": "3.5.1",
"patternslib": "2.0.11",
"moment": "2.10.6",
"parsleyjs": "1.2.4",
"chosen": "4371e8fdabe16d4e8aaa3734421edc367e32a296"
},
"devDependencies": {
"expect": "0.3.1",
"sinonjs": "1.14.1"
"sinonjs": "1.17.1"
},
"resolutions": {
"bootstrap": "3.3.6",
"jquery": "1.11.3",
"select2": "3.5.4",
"moment": "2.10.6"
}
}

0 comments on commit 56147f7

Please sign in to comment.