diff --git a/src/build/README.md b/src/build/README.md new file mode 100644 index 0000000..6fd14ff --- /dev/null +++ b/src/build/README.md @@ -0,0 +1,39 @@ +# rebuild assets + +All module related CSS/JavaScript files can be found in ``build`` directory. To +regenerate the modules assets, the ``grunt`` tasks should be used. Please +install ``grunt`` and run ``grunt's`` default task to regenerate all minimized +``css`` and ``js`` files: + +1. To use ``grunt``, ``npm`` is required. Check ``nodejs`` website for +installation instructions (https://nodejs.org/en/download/package-manager/). +After this, install ``grunt`` globally. + +2. Go to "build" directory and install all related ``grunt`` plugins: + + ``` + npm install + ``` + +3. The module-specific LESS files use the LESS variables of the shop. If you +have customized these, you may need to recreate the module assets. Please note, +that CSS and JavaScript files were overwritten by module updates. Then run the +generation again or better store your customizations in own files. + +3. configure "above the fold" stylesheets: + + If you use critical "above the fold" stylesheets, enable the penthouse and + cssmin tasks in ``build/grunt/aliases.yml`` to generate special stylesheet + files. Customize the Penthouse Plugin configuration to your needs in + ``build/grunt/penthouse.js``. Penthouse needs a working shop installation + with the latest stylesheets to run. + + If the generated above-the-fold style sheets contains formattings, they are + automatically included in the shop source. + +4. Now its possible to regenerate module assets by running ``grunt`` default +task while being in "build" directory: + + ``` + grunt + ``` \ No newline at end of file diff --git a/src/build/grunt/cssmin.js b/src/build/grunt/cssmin.js new file mode 100644 index 0000000..f13449a --- /dev/null +++ b/src/build/grunt/cssmin.js @@ -0,0 +1,15 @@ +module.exports = { + options: { + mergeIntoShorthands: false, + roundingPrecision: -1 + }, + target: { + files: [{ + expand: true, + cwd: '../out/src/css/abovethefold', + src: ['*.css', '!*.min.css'], + dest: '../out/src/css/abovethefold', + ext: '.min.css' + }] + } +}; \ No newline at end of file diff --git a/src/build/grunt/penthouse.js b/src/build/grunt/penthouse.js new file mode 100644 index 0000000..5a478b7 --- /dev/null +++ b/src/build/grunt/penthouse.js @@ -0,0 +1,42 @@ +module.exports = { + allthemes : { + outfile: '../out/src/css/abovethefold/d3extsearch_allthemes.css', + css: '../out/src/css/d3extsearch_allthemes.min.css', + url: 'https://myshop.local/', + width : 1300, + height : 400, + skipErrors : false + }, + flow : { + outfile: '../out/src/css/abovethefold/d3extsearch_flow.css', + css: '../out/src/css/d3extsearch_flow.min.css', + url: 'https://myshop.local/', + width : 1300, + height : 400, + skipErrors : false + }, + azure : { + outfile: '../out/src/css/abovethefold/d3extsearch_azure.css', + css: '../out/src/css/d3extsearch_azure.min.css', + url: 'https://myshop.local/', + width : 1300, + height : 400, + skipErrors : false + }, + mobile : { + outfile: '../out/src/css/abovethefold/d3extsearch_mobile.css', + css: '../out/src/css/d3extsearch_mobile.min.css', + url: 'https://myshop.local/', + width : 1300, + height : 400, + skipErrors : false + }, + slider : { + outfile: '../out/src/css/abovethefold/d3extsearch_slider.css', + css: '../out/src/css/d3extsearch_slider.min.css', + url: 'https://myshop.local/', + width : 1300, + height : 400, + skipErrors : false + } +}; \ No newline at end of file diff --git a/src/out/src/css/abovethefold/d3extsearch_allthemes.css b/src/out/src/css/abovethefold/d3extsearch_allthemes.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_allthemes.min.css b/src/out/src/css/abovethefold/d3extsearch_allthemes.min.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_azure.css b/src/out/src/css/abovethefold/d3extsearch_azure.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_azure.min.css b/src/out/src/css/abovethefold/d3extsearch_azure.min.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_flow.css b/src/out/src/css/abovethefold/d3extsearch_flow.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_flow.min.css b/src/out/src/css/abovethefold/d3extsearch_flow.min.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_mobile.css b/src/out/src/css/abovethefold/d3extsearch_mobile.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_mobile.min.css b/src/out/src/css/abovethefold/d3extsearch_mobile.min.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_slider.css b/src/out/src/css/abovethefold/d3extsearch_slider.css new file mode 100644 index 0000000..e69de29 diff --git a/src/out/src/css/abovethefold/d3extsearch_slider.min.css b/src/out/src/css/abovethefold/d3extsearch_slider.min.css new file mode 100644 index 0000000..e69de29