Giter Site home page Giter Site logo

emiloberg / liferay-instant-deploy-theme-changes-gulp-script Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 8.0 572 KB

This small Gulp script will monitor your source code theme folder and when a file is changed: 1. Instantly inject those theme changes into the server. 2. Makes sure that the scss is recompiled into a css file if needed. 3. LiveReload. If the scss is changed, the browser is updated instantly - without need to reloading the page.

JavaScript 100.00%

liferay-instant-deploy-theme-changes-gulp-script's People

Contributors

emiloberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

liferay-instant-deploy-theme-changes-gulp-script's Issues

Needs to ignore temporary files

When using watch mode, files starting with # and files ending with ~ should be ignored since many editors create such temporary files. Whenever such a temporary file is created, the system crashes while looking for language type in the temporary file (which it instead should ignore)

Timing issue

I seem to have provoked some sort of timing issue when using this on a machine with source on an SSD-dics, but liferay running of a non-SSD.

About 7/10 times I make changes I get an error:

Caused by: java.util.concurrent.ExecutionException: org.jruby.embed.EvalFailedException: (Errno::EACCES) /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/work/Catalina/localhost/minecraftstuff-theme/sass/a0ae2da7aeaf9d37ea636d6ba73
fb7d7bcd66f08/custom.cssc

Stacktrace:

            unlink at org/jruby/RubyFile.java:1801
         _retrieve at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/cache_stores/filesystem.rb:25
          retrieve at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/cache_stores/base.rb:63
          retrieve at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/cache_stores/chain.rb:25
              each at org/jruby/RubyArray.java:1612
   each_with_index at org/jruby/RubyEnumerable.java:951
          retrieve at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/cache_stores/chain.rb:24
          _to_tree at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/engine.rb:333
           to_tree at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/engine.rb:272
      visit_import at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:225
              send at org/jruby/RubyKernel.java:2097
             visit at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37
             visit at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100
    visit_children at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53
           collect at org/jruby/RubyArray.java:2318
    visit_children at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53
    visit_children at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109
  with_environment at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121
    visit_children at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108
             visit at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37
        visit_root at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128
              send at org/jruby/RubyKernel.java:2097
             visit at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37
             visit at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100
              send at org/jruby/RubyKernel.java:2097
             visit at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7
            render at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20
           _render at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/engine.rb:315
            render at /storage/liferay/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/temp/liferay/ruby/gems/sass-3.2.12/lib/sass/engine.rb:262
            (root) at <script>:48

Without knowing anything about the sass-engine, it seems to me like it is trying to delete a file that some other process still has a lock on?

Btw. Error messages are in liferay log, not gulp log.

Deploy Portlet Projects

Hi, any idea if this should work also on the static js content coming from a portlet in a portlet project ? I tried to add a new task to copy also js files from portlets but liferay somehow caches them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.