Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-2517

Investigate how the creation of the style.css (and javascript files) can be done in the plugin instead of composer

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Should have Should have
    • 1.29.0
    • 16
    • Sprint #50, Sprint #51, Sprint #52, Sprint #53, Sprint #56, Sprint #57, Sprint #58

      Currently the style.css is generated on a theme installation via composer. We want to move that to happen during the installation (or activation), or on any new version installed by our composer or docker processes. The goal is that the plugin should be completely autonomous and not depend on the composer or the CircleCI process.

       

      Investigate and implement that.

      Same thing should happen for the JS files

       

      The js and css files are currently created in composer with the following lines: https://github.com/greenpeace/planet4-base-fork/blob/develop/composer.json#L126-L135

      "core:style" : "pscss -f=compressed public/wp-content/themes/planet4-master-theme/assets/scss/style.scss > public/wp-content/themes/planet4-master-theme/style.css",
      
      "core:style-child" : "cd public/wp-content/themes/; for i in planet4-child-theme*; do cd $i; minifycss style.css > style.min.css; cd ..; done",
      
      
      
      "copy:style-blocks" : "rsync -ar public/wp-content/themes/planet4-master-theme/assets/scss/global public/wp-content/plugins/planet4-plugin-blocks/assets/scss/",
      
      "core:style-blocks" : "pscss -f=compressed public/wp-content/plugins/planet4-plugin-blocks/assets/scss/style.scss > public/wp-content/plugins/planet4-plugin-blocks/blocks.css",
      
      
      
      "core:js" : "cat public/wp-content/themes/planet4-master-theme/assets/js/partials/*.js > public/wp-content/themes/planet4-master-theme/assets/js/custom.js",
      
      "core:js-minify" : "minifyjs public/wp-content/themes/planet4-master-theme/assets/js/custom.js > public/wp-content/themes/planet4-master-theme/assets/js/main.js",
      
      "core:js-blocks" : "cat public/wp-content/plugins/planet4-plugin-blocks/assets/js/partials/*.js > public/wp-content/plugins/planet4-plugin-blocks/assets/js/custom.js",
      
      "core:js-blocks-minify" : "minifyjs public/wp-content/plugins/planet4-plugin-blocks/assets/js/custom.js > public/wp-content/plugins/planet4-plugin-blocks/assets/js/blocks.js",
      
      

            nroussos Nikos Roussos
            kkokkoro Konstantinos Kokkorogiannis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: