jekyll-browsersync 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -3
- data/lib/jekyll-browsersync/command.rb +19 -21
- data/lib/jekyll-browsersync/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04a0f50ba201fde043c6874cdf70f6b5a3f85cd7
|
4
|
+
data.tar.gz: 2d0bc3b8f65bfe0d20efdb40372f7a62d04abf54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 770a2aa80db19a1b86d95a2c8f270f3ff0826f09fac8b878de52329c14b23e8de92469680bf22acfe89e7c39bdb94888db4237ba836e973ba786766995f246ab
|
7
|
+
data.tar.gz: 4acead2b9aa338db4b7117d14d14e92069d8de4daf819e1a292677d043a291d8adf77da64d52b60755bacf87aaf8254e59875a97dc2fa2e963b0e57e97f66a0b
|
data/README.md
CHANGED
@@ -21,19 +21,24 @@ Then install it
|
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
24
|
-
Once you have it installed, you should have a new `
|
24
|
+
Once you have it installed, you should have a new `browsersync` command under Jekyll.
|
25
25
|
|
26
|
-
$ bundle exec jekyll
|
26
|
+
$ bundle exec jekyll browsersync
|
27
27
|
|
28
28
|
If you have Browsersync installed in a custom location, you can specify this with the
|
29
29
|
`--browser-sync` option.
|
30
30
|
|
31
|
-
$ bundle exec jekyll
|
31
|
+
$ bundle exec jekyll browser-sync --browser-sync ~/bin/browser-sync
|
32
32
|
|
33
33
|
If you would like to serve the site using https, use the `--https` option.
|
34
34
|
|
35
35
|
$ bundle exec jekyll bs --https
|
36
36
|
|
37
|
+
If you have any other options you would like passed to the Browsersync command,
|
38
|
+
pass them as arguments.
|
39
|
+
|
40
|
+
$ bundle exec jekyll browsersync -- --no-notify
|
41
|
+
|
37
42
|
## Contributing
|
38
43
|
|
39
44
|
1. Fork it (https://github.com/mloberg/jekyll-browsersync/fork)
|
@@ -22,10 +22,10 @@ module Mlo
|
|
22
22
|
}.freeze
|
23
23
|
|
24
24
|
def init_with_program(prog)
|
25
|
-
prog.command("
|
26
|
-
cmd.syntax "
|
25
|
+
prog.command("browsersync") do |cmd|
|
26
|
+
cmd.syntax "browsersync [options]"
|
27
27
|
cmd.description 'Serve a Jekyll site using Browsersync.'
|
28
|
-
cmd.alias :
|
28
|
+
cmd.alias :'browser-sync'
|
29
29
|
cmd.alias :bs
|
30
30
|
|
31
31
|
add_build_options(cmd)
|
@@ -34,7 +34,8 @@ module Mlo
|
|
34
34
|
cmd.option key, *val
|
35
35
|
end
|
36
36
|
|
37
|
-
cmd.action do |
|
37
|
+
cmd.action do |args, opts|
|
38
|
+
puts args.inspect
|
38
39
|
opts['serving'] = true
|
39
40
|
opts['watch'] = true unless opts.key?('watch')
|
40
41
|
opts['incremental'] = true unless opts.key?('incremental')
|
@@ -48,30 +49,27 @@ module Mlo
|
|
48
49
|
config = opts['config']
|
49
50
|
::Jekyll::Commands::Build.process(opts)
|
50
51
|
opts['config'] = config
|
51
|
-
Command.process(opts)
|
52
|
+
Command.process(opts, args)
|
52
53
|
end
|
53
54
|
end
|
54
55
|
end
|
55
56
|
|
56
|
-
def process(opts)
|
57
|
+
def process(opts, args)
|
57
58
|
opts = configuration_from_options(opts)
|
58
59
|
destination = opts['destination']
|
59
60
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
cmd
|
72
|
-
cmd << '--directory' if opts['show_dir_listing']
|
73
|
-
|
74
|
-
PTY.spawn(cmd.join(' ')) do |stdout, stdin, pid|
|
61
|
+
args << "--server #{destination}"
|
62
|
+
args << "--files #{destination}"
|
63
|
+
args << "--port #{opts['port']}"
|
64
|
+
args << "--host #{opts['host']}"
|
65
|
+
args << "--ui-port #{opts['ui_port']}"
|
66
|
+
args << '--https' if opts['https']
|
67
|
+
args << '--no-open' unless opts['open_url']
|
68
|
+
args << '--directory' if opts['show_dir_listing']
|
69
|
+
|
70
|
+
cmd = "#{opts['browsersync']} start #{args.join(' ')}"
|
71
|
+
|
72
|
+
PTY.spawn(cmd) do |stdout, stdin, pid|
|
75
73
|
trap("INT") { Process.kill 'INT', pid }
|
76
74
|
|
77
75
|
::Jekyll.logger.info "Server address:", server_address(opts)
|
metadata
CHANGED
@@ -1,61 +1,61 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-browsersync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Loberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.0
|
20
|
-
- - ~>
|
20
|
+
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '3.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 3.0.0
|
30
|
-
- - ~>
|
30
|
+
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '3.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - ~>
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '1.5'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - ~>
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.5'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - ~>
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '10.0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - ~>
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '10.0'
|
61
61
|
description: Add live reloading to Jekyll using Browsersync.
|
@@ -65,11 +65,11 @@ executables: []
|
|
65
65
|
extensions: []
|
66
66
|
extra_rdoc_files: []
|
67
67
|
files:
|
68
|
+
- LICENSE
|
69
|
+
- README.md
|
70
|
+
- lib/jekyll-browsersync.rb
|
68
71
|
- lib/jekyll-browsersync/command.rb
|
69
72
|
- lib/jekyll-browsersync/version.rb
|
70
|
-
- lib/jekyll-browsersync.rb
|
71
|
-
- README.md
|
72
|
-
- LICENSE
|
73
73
|
homepage: https://github.com/mloberg/jekyll-browsersync
|
74
74
|
licenses:
|
75
75
|
- MIT
|
@@ -80,17 +80,17 @@ require_paths:
|
|
80
80
|
- lib
|
81
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.5.1
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Add live reloading to Jekyll using Browsersync.
|