Browse Source

Minify livereload.js

index-subcmd
Vincent Prouillet 7 years ago
parent
commit
d9ed7df118
3 changed files with 5 additions and 1157 deletions
  1. +1
    -1156
      src/bin/cmd/livereload.js
  2. +4
    -0
      src/bin/cmd/serve.rs
  3. +0
    -1
      tests/site.rs

+ 1
- 1156
src/bin/cmd/livereload.js
File diff suppressed because it is too large
View File


+ 4
- 0
src/bin/cmd/serve.rs View File

@@ -23,6 +23,10 @@ enum ChangeKind {
StaticFiles, StaticFiles,
} }


// Uglified using uglifyjs
// Also, commenting out the lines 330-340 (containing `e instanceof ProtocolError`) was needed
// as it seems their build didn't work well and didn't include ProtocolError so it would error on
// errors
const LIVE_RELOAD: &'static str = include_str!("livereload.js"); const LIVE_RELOAD: &'static str = include_str!("livereload.js");






+ 0
- 1
tests/site.rs View File

@@ -391,5 +391,4 @@ fn test_can_build_site_with_pagination_for_index() {
assert!(file_contains!(public, "index.html", "Last: https://replace-this-with-your-url.com/")); assert!(file_contains!(public, "index.html", "Last: https://replace-this-with-your-url.com/"));
assert_eq!(file_contains!(public, "index.html", "has_prev"), false); assert_eq!(file_contains!(public, "index.html", "has_prev"), false);
assert_eq!(file_contains!(public, "index.html", "has_next"), false); assert_eq!(file_contains!(public, "index.html", "has_next"), false);

} }

Loading…
Cancel
Save