 			gulp.start "#{config.rb.prefix.task}watch-build-spa"
 		browserSync: ->
 			browserSync.reload stream:false
-
-	# globs
-	# =====
-	getGlob = (loc, type, lang) ->
-		globs = []
-		['app'].forEach (v1) ->
-			['client', 'server'].forEach (v2) ->
-			for v2 in ['client', 'server']
-				break if v2 is 'server' and type isnt 'scripts'
-				_glob = config.glob[loc][v1][v2][type][lang]
-				continue unless _glob.length
-				for v3 in _glob
-					globs.push v3
-		globs
-	glob =
-		src:
-			coffee: getGlob 'src', 'scripts', 'coffee'
-			css:    getGlob 'src', 'styles',  'css'
-			es6:    getGlob 'src', 'scripts', 'es6'
-			js:     getGlob 'src', 'scripts', 'js'
-			less:   getGlob 'src', 'styles',  'less'
-			html:   getGlob 'src', 'views',   'html'
-			images: getGlob 'src', 'images',  'all'
 
 	# helpers
 	# =======


	# html watch (handle angular template cache)
	# ==========================================
	htmlWatch = ->
		if config.angular.templateCache.dev
			createWatch glob.src.html, 'tCache',
				lang:'html', srcType:'views', taskOnly:true, logTaskName:'template cache'
		else
			createWatch glob.src.html, 'html', lang:'html', srcType:'views', bsReload:true

	# spa watch (if custom spa file then watch it)
	# ============================================
	spaWatch = ->
		if config.spa.custom
			return createWatch config.spa.src.path, 'build spa', lang: config.spa.dist.file
		promiseHelp.get()

	# register task
	# =============

		defer = q.defer()
		q.all([
			# images
			createWatch config.glob.src.app.client.images.all,     'image',  lang:'image',  srcType:'images',  bsReload:true
			# styles
			createWatch config.glob.src.app.client.styles.css,     'css',    lang:'css',    srcType:'styles'
			createWatch config.glob.src.app.client.styles.less,    'less',   lang:'less',   srcType:'styles',  extDist:'css'
			# client scripts
			createWatch config.glob.src.app.client.scripts.coffee, 'coffee', lang:'coffee', srcType:'scripts', extDist:'js'
			createWatch config.glob.src.app.client.scripts.es6,    'es6',    lang:'es6',    srcType:'scripts', extDist:'js'
			createWatch config.glob.src.app.client.scripts.js,     'js',     lang:'js',     srcType:'scripts'
			# server scripts
			createWatch config.glob.src.app.server.scripts.coffee, 'coffee', lang:'coffee', srcType:'scripts', extDist:'js', loc:'server'
			createWatch config.glob.src.app.server.scripts.es6,    'es6',    lang:'es6',    srcType:'scripts', extDist:'js', loc:'server'
			createWatch config.glob.src.app.server.scripts.js,     'js',     lang:'js',     srcType:'scripts', loc:'server'
			# views
			htmlWatch config.glob.src.app.client.views.html
			# spa
			spaWatch config.spa.src.path
		]).done -> defer.resolve()
		defer.promise

