Code Monkey home page Code Monkey logo

Comments (6)

redfox05 avatar redfox05 commented on August 20, 2024

FOUND THE CULPRIT!

Using the Chrome Network tab, I found that the following file ended up taking 28 seconds to attempt to load, and after the 28 seconds, it gave up and status was failed in the Chrome Network tab.

livereload.js?snipver=1

See screenshot below:
screen shot 2016-06-10 at 15 41 54

Any suggestions how to fix? I presume this is because livereload should only be there on the local dev side, and surely should not have found its way into the www folder.

from styleguide.

caiovaccaro avatar caiovaccaro commented on August 20, 2024

Hi!

Which version are you using? This is an old issue that should be already fixed.

from styleguide.

redfox05 avatar redfox05 commented on August 20, 2024

It appears to be Styleguide - v.2 2016/6/10. The pull/fork from git was on 7 June 2016.
I only literally pulled the code after you fixed the unit tests to pass the other day.

Where is the duplicate of this, shall I continue on another ticket?

from styleguide.

redfox05 avatar redfox05 commented on August 20, 2024

Im still trying to debug this, and fix it myself, but I can't understand why livereload.js is being injected into the compiled www/index.html as livereload.js is only for the development environment correct?

I could just remove the folllowing line of code from index.html, but this would mean no live reload during dev work.

<script src="styleguide/structure/scripts/styleguide.js"></script><script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':8374/livereload.js?snipver=1"></' + 'script>')</script>

Any suggestions? It's very annoying to have to wait about 20-30 seconds for the loading of the script to time out, and for some reason, it stops you using any of the menus. I presume this is because jQuery is waiting for document ready before it does its click listener stuff?

from styleguide.

redfox05 avatar redfox05 commented on August 20, 2024

For the time being, my workaround within index.jade is as follows:

    if !process.env.STYLEGUIDE_COMPILE
        script.
            if(location.host.split(':')[0]==='localhost') { document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':8374/livereload.js?snipver=1"></' + 'script>'); }

I know I can take out the if !process.env.STYLEGUIDE_COMPILE but im leaving it in incase @caiovaccaro can come back with a fix, and then its easier to add in.

from styleguide.

caiovaccaro avatar caiovaccaro commented on August 20, 2024

Hi @redfox05 , thanks.

Yes if you are using the Compile.app this shouldn't happen, other wise you need to add STYLEGUIDE_COMPILE=1 before harp compile.

from styleguide.

Related Issues (20)

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.