Giter Club home page Giter Club logo

review-live-reload's Introduction

Re:VIEW Live Reload

Re:VIEWファイルを編集すると同時にブラウザでライブリロードするサンプル。
同梱のCSSによって見開きの本のような見た目でプレビューすることができます。

Demo

screenshot

Setup

git clone https://github.com/yoshiko-pg/review-live-reload.git
cd review-live-reload
bundle install --binstubs=bin --path .bundle

別途ブラウザへguard-livereload用の拡張機能をインストール
http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions

Chromeの場合、インストール後に拡張機能の設定(chrome://extensions/)でLiveReloadの「ファイルのURLへのアクセスを許可する」にチェックを入れないと動作しませんでしたので忘れずに。

Run

bundle exec rake server
bundle exec guard

http://localhost:5000/ch01.html を表示
Browser Extensionを有効化(Chromeの場合、拡張機能ボタンを押して**の四角が黒くなればOK)

上記の状態でsrc/*.re もしくは src/main.cssを修正すると変更がリアルタイムにブラウザへ反映されます。
プレビュー表示は右側に続いていくので下ではなく右にスクロールしてください。

Attention

本のような見た目を表現するためにCSSにcolumn-countというスタイルを指定していますが、これがあるとePub出力する際にコンテンツが途中で途切れてしまいます。
ePub出力の際はbodyについているcolumn関連のスタイルをコメントアウトしてください。

Thanks

このリポジトリは以下のリポジトリの内容を合体させて手を加えたものです。

src/以下

https://github.com/takahashim/review-sample-book

Gemfile, Guardfile, Rakefile

https://github.com/xoyip/review-livereload

review-live-reload's People

Contributors

takahashim avatar yoshiko-pg avatar

Watchers

James Cloos avatar

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.