Giter Site home page Giter Site logo

livereload-extensions's Introduction

LiveReload 3

LiveReload is an essential tool for web developers, and is currently the top paid developer tool on the Mac App Store in many countries.

License

Copyright 2012–2015, Andrey Tarantsov — [email protected]

Purchasing policy notice: All users of the software are expected to purchase a license from Andrey Tarantsov unless they have a good reason not to pay. Users that don't purchase a license are encouraged to apply for a free one at [email protected]. The users are free to:

  • download, build and modify the app;
  • share the modified source code;
  • share the purchased or custom-built binaries (with unmodified license and contact info), provided that the purchasing policy is explained to all potential users.

This software is available under the Open Community Indie Software License:

Permission to use, copy, modify, and/or distribute this software for any purpose is hereby granted, free of charge, subject to the following conditions:

  • all copies retain the above copyright notice, the above purchasing policy notice and this permission notice unmodified;

  • all copies retain the name of the software (LiveReload), the name of the author (Andrey Tarantsov) and the contact information (including, but not limited to, pointers to [email protected] and livereload.com URLs) unmodified;

  • no fee is charged for distibution of the software;

  • when distributing the software, the best effort is made to explain the purchasing policy to all users of the software who don't already have a license.

In the event that no new official binary releases of the software are published for two consecutive years, the above conditions are permanently waived, and the software is additionally made available under the terms of the MIT license.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Building LiveReload for Windows

Follow windows/README.md.

Building LiveReload for Mac

Note: right now this branch is in a transitional state; I'm doing active development of Mac v3.0.x. See the ‘master’ branch for the latest stable Mac version (v2.3.x).

Prerequisites:

  • Xcode 6.0 Beta4+
  • Node 0.10
  • CoffeeScript 1.6.x: npm install -g coffee-script
  • underscore.js: npm install -g underscore
  • grunt
  • optionally, Ruby 1.8.7 with Rake for running Rake tasks

For running tests:

  • Mocha 1.7.0: npm install -g mocha
  • Cucumber.js 0.3.0: npm install -g cucumber
  • fsmonitor 0.2.2: npm install -g fsmonitor (warning: don't rely on --version, it lies)

Building:

  1. Don’t forget to pull all submodules after getting the source code.

  2. Install and compile the backend modules:

     cd node_modules/livereload-new     && npm install && grunt &&
     cd ../livereload-service-dummy     && npm install && grunt
     cd ../livereload-service-server    && npm install && grunt
     cd ../livereload-service-reloader  && npm install && grunt
     cd ../livereload-soa               && npm install && grunt
     cd ../livereload-server            && coffee -c lib
     cd ../livereload-protocol          && coffee -c lib
     cd ../pathspec                     && coffee -c lib
    
  3. Package the backend modules into mac/backend:

     cd scripts && npm install
     cd ..
     scripts/node_modules/.bin/_coffee scripts/package-backend.coffee_ node_modules/livereload-new mac/backend
    

    During development, use override mode instead — open Xcode scheme settings and set LRBackendOverride env var to the full path of node_modules/livereload-new/bin/livereload.js.

  4. Open LiveReload/LiveReload.xcodeproj

  5. Build some subprojects in the correct order (because the dependencies between subprojects aren't properly tracked — let me know if you know a way to specify those), you can do this from Xcode or on the command line:

     cd mac
     make
    
  6. Build the app, you can do this from Xcode or on the command line:

     xcodebuild -project LiveReload.xcodeproj -scheme LiveReload -configuration Debug build
    

Until the project is configured correctly, you may need to clean & rebuild often before running tests. Use mac/rebuild.sh for that.

LR for Mac hacking tips

  • Add backend/ to LiveReload, enable compilation.
  • Set LRBackendOverride environment variable to /path/to/LiveReload/node_modules/livereload-new/bin/livereload.js, so your changes are picked up without rerunning rake backend.
  • To run multiple copies of LiveReload, set LRPortOverride to some unused TCP port.
  • Set LRBundledPluginsOverride to specify a path to the bundled plugins when running on the command line.
    • (Also useful for speeding up Xcode builds; temporarily delete bundled plugins from the project and set this variable so that LiveReload can find them.)

Running tests

The tests are under mac/LiveReloadTestProjects.

First, build & run LiveReload, open the main window, click the gears icon in title bar, then choose ‘Allow Access to Folder...’ and pick the LiveReloadTestProjects folder.

Then, for a testing configuration, set environment variable LRRunTests to point to the absolute path of LiveReloadTestProjects directory, e.g.

LRRunTests=/Users/andreyvit/dev/livereload/devel/mac/LiveReloadTestProjects

Additionally, you may want to add -LogToConsole YES to the list of launch arguments, so that you can see the entire output when testing.

You may also want to set LRBundledPluginsOverride environment variable, as described above.

git-subdir

We're using git-subdir to sync commits between this repository and the repositories of individual projects.

This probably is of no concern to you, but in case you need it, you can run the following commands to set it up:

git subdir node_modules/livereload/ -r cli --url [email protected]:livereload/livereload-cli.git --method squash,linear
git subdir node_modules/livereload-core/ -r core --url [email protected]:livereload/livereload-core.git --method squash,linear
git subdir node_modules/livereload-server/ -r server --url [email protected]:livereload/livereload-server.git --method squash,linear
git subdir node_modules/livereload-client/ -r client --url [email protected]:livereload/livereload-client.git --method squash,linear
git subdir node_modules/livereload-protocol/ -r protocol --url [email protected]:livereload/livereload-protocol.git --method squash,linear

git subdir node_modules/fsmonitor/ -r fsmonitor --url [email protected]:andreyvit/fsmonitor.js.git --method squash,linear
git subdir node_modules/jobqueue/ -r jobqueue --url [email protected]:livereload/jobqueue.git --method squash,linear
git subdir node_modules/pathspec/ -r pathspec --url [email protected]:andreyvit/pathspec.js.git --method squash,linear
git subdir node_modules/reactive/ -r reactive --url [email protected]:andreyvit/reactive.js.git --method squash,linear

git subdir node_modules/vfs-local/ -r vfs-local --url [email protected]:livereload/vfs-local.git --method squash,linear
git subdir node_modules/vfs-test/ -r vfs-test --url [email protected]:livereload/vfs-test.git --method squash,linear

git-subdir mac/ATPathSpec --url [email protected]:andreyvit/ATPathSpec.git --method squash,linear

Signing the bundled Node.js binary

Copy:

cp /usr/local/bin/node LiveReload/Resources/LiveReloadNodejs

Sign:

codesign -f -s "3rd Party Mac Developer Application: Andrey Tarantsov" --entitlements LiveReload/Resources/LiveReloadNodejs.entitlements LiveReload/Resources/LiveReloadNodejs

Verify:

codesign -dvvv ./LiveReload/Resources/LiveReloadNodejs

AppNewsKit

(See Stats.h/m. This is a seriously cool shit to communicate with your live users. Consider those files to be under MIT. I’ll extract and document it properly soon.)

  • Collect usage statistics
  • Deliver news to your users

Example ping.txt:

    {
        "see_explanation_at": "http://help.livereload.com/kb/about-us/usage-statistics-privacy-policy",
        "messages": [
            {
                "title": "MyApp on the Mac App Store!",
                "message": "MyApp 2.1 has been released on the Mac App Store, and is on sale (50% off)! Do you want to learn more about it?",
                "id": "myapp-2.0.0-release",
                "version": [">=2.0 <3.0"],
                "status": ["unregistered"],
                "stats": {
                    "stat.reloads": { "min": 10 }
                },
                "delay_if_nagged_within": "3d",
                "remind_later_in": "5d",
                "deliver_after": "2011-12-08 16:33:00",
                "wait_until_good_time": true,
                "delivery_on_stats": {
                    "or": {
                        "stat.reloads.last": { "within": 30 },
                        "stat.launch.first": { "within": 120 }
                    }
                },
                "random_percentage": 50,
                "primary_button_url": "http://myapp.com/mas/",
                "primary_button_title": "Visit Mac App Store"
            }
        ]
    }

livereload-extensions's People

Contributors

andreyvit avatar aolshevskiy avatar daawesomep avatar gavro avatar maksimr avatar vestride 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

livereload-extensions's Issues

Chrome + Drupal: Works intermittently (insufficient delay?)

I'm wondering if the Chrome extension is not waiting long enough for the <link> tags it adds to finish loading or something. I'm experiencing a loss of updated styles whenever guard-livereload prompts the browser to refresh. Occasionally, I don't experience this, but there isn't much rhyme or reason to when it happens. But once it does, I basically just have to refresh the page manually.

I really really want to get live updating working!

Specify license inside the source code?

livereload.com says

The browser extensions and livereload.js are under MIT. If you find a nice generic class or a piece of code you'd like to reuse, I will probably be happy to release it under MIT.

but I cannot find license specified anywhere in the source code.

So, questions are:

  • Is it said anywhere in the repo that source is under the MIT?
  • If not, shouldn't it be specified in source?

Thanks.

Incorrect reloading of LESS

<style type="text/css" id="less:style-style:less-livereload-1410346455570">...</style>
<style type="text/css" id="less:style-style">...</style>

to update(rewrite) styles you should push new styles after old

<style type="text/css" id="less:style-style">...</style>
<style type="text/css" id="less:style-style:less-livereload-1410346455570">...</style>

or you should remove old styles

Chrome: Disable log output

Would it be possible to please add an option to disable console.log output? It mixes with my own app debugging output and makes it really difficult to process.

Make host:port configurable in the extension

The feedback site[1] mentions that 'Browser extensions always use port 35729' and, I am assuming, always on localhost.

It would be nice if the extension (Chrome, Firefox, .., any one at least?) had host:port configurable, with a user interface.

I am sure there are many cases when this is useful. Let me include one such example because I can:
Sometimes with VM based development setup such as VVV for WordPress[2] it is natural to run the guard-livereload server inside the VM. Perhaps VVV[2] would add an option to automatically set up and start guard-livereload inside the VM once this issue is resolved.

[1] http://feedback.livereload.com/knowledgebase/articles/195869-how-to-change-the-port-number-livereload-listens-o
[2] https://github.com/varying-vagrant-vagrants/vvv/

LiveReload protocol error (invalid command 'hello', only valid commands are: reload, alert)) after receiving data:

Actually LiveRelaod save my day as i don't wanna refresh every time i make changes and wanna see it, it automaticaly do livereload for me.

when i working with Chrome all fine , but when it is come to Firefox this error repeat on console |

LiveReload protocol error (invalid command 'hello', only valid commands are: reload, alert)) after receiving data: "{"command":"hello","protocols":["http://livereload.com/protocols/official-7"],"serverName":"atom-livereload"}".. ( livereload.js:351:32 )

livereload

Please can help me to resolve this problem

Chrome extension doesn't work on Chrome canary build

I'm using the Chrome canary build, mostly because of the major improvements in the JS debugging experience. But the LiveReload extension doesn't work on that version. When I click the icon to connect, it pops up an error saying "Could not connect to the LiveReload server." The extension works fine on the beta channel version.

Firefox Australis duplicated button

Hi,

In current Firefox 29 (Australis), Livereload button is duplicated and one of them can't be remove from the "customize" menu.
Seems you must remove the "nav-bar" item in browser.xul to remove this button

<toolbar id="nav-bar">
    <toolbarbutton id="livereload-button" label="LR" tooltiptext="Enable LiveReload" image="chrome://livereload/skin/IconDisabled.png" type="button" class="toolbarbutton-1 chromeclass-toolbar-additional" style="" />
</toolbar>

Regards,

Clearer feedback if the plugin is working or not (Chrome)

I've only checked the Chrome icons but they're all the same. There's little (and unclear) difference if Livereload is active or not. It would be nice with a clearer visual queue.

Active:
Disabled:

Especially now that I've installed it on a new computer. I press the icon but I get no feedback. LR doesn't seem to work, but I have no idea why. A red icon or something when it's not working would be nice. Especially nice if it would output some kind of feedback in text somewhere (console maybe? popover?).

Maybe I'm missing something?

Chrome 34 does not reflect CSS changes until cursor hovers over viewport

I've only noticed this since updating to Chrome 34 (specifically 34.0.1847.116), so it may be a result of a new behaviour of Chrome

When I make CSS changes the LiveReload plugin detects/fires the onload event (as logged in dev tools), but the page rendering is not updated until the cursor hovers over the viewport. This seems to happen about 90% of the time.

CSS Doesn't apply until I refresh the page

Google Chrome Version 26.0.1410.43 m. I'm using it with guard-livereload. Anyone else who has this issue?

I also tried this on my Guardfile

guard 'livereload', :apply_css_live => true do
  watch(%r{.+\.(html)})
  watch(%r{css/style.css})
end

Page reload after LESS files refresh w/Chrome extension

The Chrome extension refreshes LESS files (you can see the CSS update), but immediately reloads the whole page, which should not be the default behavior.

Using:

Windows alpha version of LiveReload on Win7
Chrome version 21.0.1180.60 m

Unable to build the extensions

Trying to build using "grunt all" but getting the following error:

Error: Cannot find module 'livereload-js' from '/Users/[user]/github/livereload-extensions/src'

I did a npm install before getting started. Am I missing something ??

Doesn't well work for me

Only reloads one time, the only way I can make it work is by disabling it and enabling it but then it only works one time.

Firefox extension doesn't seem to work

OS: Ubuntu 12.04
LiveReload Server: Guard-LiveReload v1.0.0
LiveReload-Extension: Firefox(13.0) extension v2.0.8 and 2.0.9

Starting Guard:
%> guard
Guard uses NotifySend to send notifications.
Guard is now watching at '/webapps/unite-ass'
> LiveReload 1.6 is waiting for a browser to connect.
> 
Pressing the LiveReload-Button in Firefox:

(Happens with the official 2.0.8 downloaded from here and a freshly build 2.0.9 from this Repo)

Browser connected.
Browser URL: {"command":"hello","protocols":["http://livereload.com/protocols/connection-check-1"]}
Browser disconnected.
Pressing the LiveReload-Button in Chromium:

(only tested v2.0.8, but i think 2.0.9 should be fine too)

Browser connected.
Browser URL: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.6","ext":"Chrome","extver":"2.0.8"}
Using Rack-LiveReload:
Browser connected.
Browser URL: {"command":"hello","protocols":["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],"ver":"2.0.3"}

CSS saving is one step behind

Hi there,

I'm using Windows 7, Sublime Text version 2.0.1, Fire app and the LiveReload Chrome extension.
Everything works fine except for the fact that there seems to be a delay in CSS refreshing.

When I save an scss file, Sublime does send the command "Send LiveReload command for file: filename.css", but nothing happens.
When I save again after a few seconds (immediately doesn't work), it does work, but only the first changes are saved.
All changes are one step behind.

Is this due to my combination with Fire app?

Firefox- Can't move toolbar button

The toolbar button has fixed itself permanently to the right of the Google search bar and I cannot move or remove it like I can other interface buttons. I've restarted my browser

Provide context menu in Browsers

It would be great if I could remove the icon from the toolbar and enable/disable it via the context menu.

I've tried to create a pull request but I don't know how to build the extension, to be able to test it.

Ugly icon on Safari

I feel a bit pathetic making this issue, but the icon for the Safari Extension seems to be blurry. I've looked inside of the extension folder and all of the images seem fine, so I'm not sure why this is. Is it just me?

Icon

[Feature Request] Better Icons

The difference between the enabled and disabled states on the chrome browser extension (which I use) is very subtle. It would help if we could make the circle inside bigger or add a dash of color. I have attached some screenshots below. I can submit a PR if one of these is okay-ed. I can also share the original source files/iterate on the Hex colors to be used in the icons.

  • Active/Enabled with just grey
    Active with just grey
  • Active/Enabled with color
    Active with color
  • Disabled with color
    Disabled With Color
  • Unavailable with color
    Unavailable with color

Issue with SSL

There seems to be an issue with SSL, it'll load livereload from http, not from https. Any way around this?

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.