Skip to content
Permalink
Browse files

feat(option): add ports.reloadUI option to set browsersync's user-int…

…erface server port
  • Loading branch information
jyounce committed Aug 11, 2015
1 parent 78c55a8 commit 1290b4e964d7171b84afe0be1aceb189b2a27f66
Showing with 13 additions and 9 deletions.
  1. +1 −0 README.md
  2. +4 −3 config/config-options.coffee
  3. +4 −3 config/config-ports.coffee
  4. +4 −3 tasks/browser/browser-sync.coffee
@@ -114,6 +114,7 @@ gulp rapid-build:test:prod
# src.server.dir = (string) defaults to 'server'
# ports.server = (int) defaults to 3000, web server port
# ports.reload = (int) defaults to 3001, browsersync server port
# ports.reloadUI = (int) defaults to 3002, browsersync's user-interface server port
# ports.test = (int) defaults to 9876, karma server port
# order[scripts|styles][first|last] = (array of strings) = file paths
# angular.modules = (array of strings) = additional angular modules to load, already loaded are ['ngResource', 'ngRoute', 'ngSanitize'] and 'ngMockE2E' based on angular.httpBackend options
@@ -22,9 +22,10 @@ module.exports = (config, options) ->

portOptions = -> # server ports
options.ports = {} if not isType.object options.ports
options.ports.server = null if not isType.number options.ports.server
options.ports.reload = null if not isType.number options.ports.reload
options.ports.test = null if not isType.number options.ports.test
options.ports.server = null if not isType.number options.ports.server
options.ports.reload = null if not isType.number options.ports.reload
options.ports.reloadUI = null if not isType.number options.ports.reloadUI
options.ports.test = null if not isType.number options.ports.test

orderOptions = ->
options.order = {} if not isType.object options.order
@@ -5,9 +5,10 @@ module.exports = (config, options) ->
# init ports
# ==========
ports = {}
ports.server = options.ports.server or 3000
ports.reload = options.ports.reload or 3001
ports.test = options.ports.test or 9876
ports.server = options.ports.server or 3000
ports.reload = options.ports.reload or 3001
ports.reloadUI = options.ports.reloadUI or 3002
ports.test = options.ports.test or 9876

# add ports to config
# ===================
@@ -4,9 +4,10 @@ module.exports = (gulp, config) ->
bs = browserSync.create()

bsConfig =
files: config.glob.browserSync
proxy: "http://localhost:#{config.ports.server}/"
port: config.ports.reload
files: config.glob.browserSync
proxy: "http://localhost:#{config.ports.server}/"
port: config.ports.reload
ui: port: config.ports.reloadUI
browser: 'google chrome'
# open: false

0 comments on commit 1290b4e

Please sign in to comment.
You can’t perform that action at this time.