id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | # page: Page to render
# pageOverrides: Overrides for the current page
# pageNumber: Index of the Page in the Dashboard (zero-indexed)
# dashboard: Entire Dashboard object
#
cyclotronDirectives.directive 'dashboardPage', ($compile, $window, $timeout, configService, layoutService, logService) ->
{
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d9f6710d26e1473dc1dab805685dd5b572fead4a | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | # page: Page to render
# pageOverrides: Overrides for the current page
# pageNumber: Index of the Page in the Dashboard (zero-indexed)
# dashboard: Entire Dashboard object
#
cyclotronDirectives.directive 'dashboardPage', ($compile, $window, $timeout, configService, layoutService, logService) ->
{
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:raw_corpus | raw_corpus | link: (scope, element, attrs) ->
$element = $(element)
$dashboard = $element.parents('.dashboard')
$dashboardPageInner = $element.children('.dashboard-page-inner')
$dashboardControls = $dashboard.find '.dashboard-controls'
$dashboardSidebar = $dashboard.find '... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 44 | 83 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
link: (scope, element, attrs) ->
$element = $(element)
$dashboard = $element.parents('.dashboard')
$dashboardPageInner = $element.children('.dashboard-page-inner')
$dashboardControls = $dashboard.find '.dashboard-co... | ({
link: function(scope, element, attrs) {
var $dashboard, $dashboardControls, $dashboardPageInner, $dashboardSidebar, $element, masonry;
$element = $(element);
$dashboard = $element.parents('.dashboard');
$dashboardPageInner = $element.children('.dashboard-page-inner');
$dashboardControls = $dash... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 44 | 83 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
link: function(scope, element, attrs) {
var $dashboard, $dashboardControls, $dashboardPageInner, $dashboardSidebar, $element, masonry;
$element = $(element);
$dashboard = $element.parents('.dashboard');
$dashboardPageInner = $element.children('... | link: (scope, element, attrs) ->
$element = $(element)
$dashboard = $element.parents('.dashboard')
$dashboardPageInner = $element.children('.dashboard-page-inner')
$dashboardControls = $dashboard.find '.dashboard-controls'
$dashboardSidebar = $dashboard.find '... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 44 | 83 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:completion | completion | link: (scope, element, attrs) ->
$element = $(element)
$dashboard = $element.parents('.dashboard')
$dashboardPageInner = $element.children('.dashboard-page-inner')
$dashboardControls = $dashboard.find '.dashboard-controls'
$dashboardSidebar = $dashboard.find '... | # Update the layout -- this triggers all widgets to update
# Masonry will be called after all widgets have redrawn
updateLayout = ->
scope.postLayout = _.after newValue.widgets.length, ->
if (newValue.enableMasonry != false)
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 44 | 83 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:raw_corpus | raw_corpus | # Enable/disable scrolling of the dashboard page
if !scope.layout.scrolling
$element.parents().addClass 'fullscreen'
else
$element.parents().removeClass 'fullscreen'
# Update everything
updateLayout(... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 85 | 124 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:completion | completion | # Enable/disable scrolling of the dashboard page
if !scope.layout.scrolling
$element.parents().addClass 'fullscreen'
else
$element.parents().removeClass 'fullscreen'
# Update everything
updateLayout(... | $dashboard.addClass('dashboard-' + newValue.theme)
$dashboardControls.addClass('dashboard-' + newValue.theme)
# Set dashboard background color from theme
themeSettings = configService.dashboard.properties.theme.options[newValue.theme]
if newValue.theme? a... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | aa249eacd2cdb7409ce6c4581e1cedf99c9471b7 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/aa249eacd2cdb7409ce6c4581e1cedf99c9471b7/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 85 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 08680403c1ab72b7789517426293681c2224eada | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | # page: Page to render
# pageOverrides: Overrides for the current page
# pageNumber: Index of the Page in the Dashboard (zero-indexed)
# dashboard: Entire Dashboard object
#
cyclotronDirectives.directive 'dashboardPage', ($compile, $window, $timeout, configService, layoutService, logService) ->
{
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 08680403c1ab72b7789517426293681c2224eada | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2016 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | # page: Page to render
# pageOverrides: Overrides for the current page
# pageNumber: Index of the Page in the Dashboard (zero-indexed)
# dashboard: Entire Dashboard object
#
cyclotronDirectives.directive 'dashboardPage', ($compile, $window, $timeout, configService, layoutService, logService) ->
{
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:raw_corpus | raw_corpus | link: (scope, element, attrs) ->
$element = $(element)
$dashboardPageInner = $element.children('.dashboard-page-inner')
$dashboardControls = $('.dashboard-controls')
scope.controlTimer = null
masonry = (element, layout) ->
$dashboardPageInner... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 44 | 84 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:completion | completion | link: (scope, element, attrs) ->
$element = $(element)
$dashboardPageInner = $element.children('.dashboard-page-inner')
$dashboardControls = $('.dashboard-controls')
scope.controlTimer = null
masonry = (element, layout) ->
$dashboardPageInner... | padX = configService.dashboard.controls.hitPaddingX
padY = configService.dashboard.controls.hitPaddingY
return unless $dashboardControls? and controlOffset?
scope.controlTarget = {
top: controlOffset.top - padY
bottom: controlOffs... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 44 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:raw_corpus | raw_corpus | scope.controlTimer = $timeout(makeControlsDisappear, configService.dashboard.controls.duration)
, 500, { leading: true })
controlHitTest = (event) ->
# Abort if outside the target
if event.pageX < scope.controlTarget.left ||
event.pageX > scope... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 125 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:completion | completion | scope.controlTimer = $timeout(makeControlsDisappear, configService.dashboard.controls.duration)
, 500, { leading: true })
controlHitTest = (event) ->
# Abort if outside the target
if event.pageX < scope.controlTarget.left ||
event.pageX > scope... | #
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
#
# Watch the dashboard page and update the layout
#
scope.$watch 'page', (newValue, oldValue) ->
if _.isUndefined(newValue) then return
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 125 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:raw_corpus | raw_corpus | # Set page margin if defined
if !_.isNullOrUndefined(scope.layout.margin)
$element.css 'padding', scope.layout.margin + 'px'
$dashboardPageInner.css {
marginRight: '-' + scope.layout.gutter + 'px'
marginBott... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 127 | 166 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:completion | completion | # Set page margin if defined
if !_.isNullOrUndefined(scope.layout.margin)
$element.css 'padding', scope.layout.margin + 'px'
$dashboardPageInner.css {
marginRight: '-' + scope.layout.gutter + 'px'
marginBott... | updateLayout()
resizeFunction = _.throttle(->
scope.$apply(updateLayout)
, 65)
# Update on window resizing
$(window).on 'resize', resizeFunction
scope.$on '$destroy', ->
$(window).off 'resize', res... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 127 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:5:raw_corpus | raw_corpus | return
#
# Cleanup
#
scope.$on '$destroy', ->
$(document).off 'mousemove', controlHitTest
$(document).off 'scroll', calculateMouseTarget
# Cancel timer
$timeout.cancel(scope.controlTimer) if scope.controlTi... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 168 | 186 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:5:completion | completion | return
#
# Cleanup
#
scope.$on '$destroy', ->
$(document).off 'mousemove', controlHitTest
$(document).off 'scroll', calculateMouseTarget | # Cancel timer
$timeout.cancel(scope.controlTimer) if scope.controlTimer?
# Uninitialize Masonry if still present
if $dashboardPageInner.data('masonry')
$dashboardPageInner.masonry('destroy')
return
} | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/bc4b0328fb9e7d1f539ede0b874aba475a4c8f0d/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 168 | 186 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 43 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | scope:
page: '='
dashboard: '='
template: '<div class="dashboard-page dashboard-{{page.theme}} {{page.style}}">' +
'<div class="dashboard-page-inner">' +
'<div widget="widget" class="dashboard-widgetwrapper dashboard-{{widget.theme}}" ng-repeat="widget in pag... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 1 | 43 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:raw_corpus | raw_corpus | calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height()
padX = configService.dashboard.control... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height... | var calculateMouseTarget, controlHitTest, makeControlsAppear, makeControlsDisappear;
calculateMouseTarget = function() {
var controlHeight, controlOffset, controlWidth, padX, padY;
// Get all dimensions and the padding options
controlOffset = $dashboardControls.offset();
controlWidth = $dashboardControls.width... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var calculateMouseTarget, controlHitTest, makeControlsAppear, makeControlsDisappear;
calculateMouseTarget = function() {
var controlHeight, controlOffset, controlWidth, padX, padY;
// Get all dimensions and the padding options
controlOffset = $dashboardContr... | calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height()
padX = configService.dashboard.control... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:completion | completion | calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height()
padX = configService.dashboard.control... | makeControlsAppear = _.throttle(->
# Make visible
$dashboardControls.addClass 'active'
# Set timer to remove the controls after some delay
$timeout.cancel(scope.controlTimer) if scope.controlTimer?
scope.controlTimer = $timeout(makeContro... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:raw_corpus | raw_corpus | #
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
... | // Configure Dashboard Controls
calculateMouseTarget();
// Bind mousemove event for entire document (remove during $destroy)
$(document).on('mousemove', controlHitTest);
$(document).on('scroll', calculateMouseTarget);
// Watch the dashboard page and update the layout
scope.$watch('page', function(newValue, oldV... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Configure Dashboard Controls
calculateMouseTarget();
// Bind mousemove event for entire document (remove during $destroy)
$(document).on('mousemove', controlHitTest);
$(document).on('scroll', calculateMouseTarget);
// Watch the dashboard page and update t... | #
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:completion | completion | #
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
... | # Masonry will be called after all widgets have redrawn
updateLayout = ->
scope.postLayout = _.after newValue.widgets.length, ->
if (newValue.enableMasonry != false)
masonry(element, scope.layout)
newLayout = la... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:raw_corpus | raw_corpus | # Enable/disable scrolling of the dashboard page
if !scope.layout.scrolling
$element.parents().addClass 'fullscreen'
else
$element.parents().removeClass 'fullscreen'
# Store updated hit target for the dashboard ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 126 | 165 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:completion | completion | # Enable/disable scrolling of the dashboard page
if !scope.layout.scrolling
$element.parents().addClass 'fullscreen'
else
$element.parents().removeClass 'fullscreen'
# Store updated hit target for the dashboard ... | scope.$on '$destroy', ->
$(window).off 'resize', resizeFunction
# Apply page theme class to dashboard-controls
$dashboardControls.addClass('dashboard-' + newValue.theme)
# Set dashboard background color from theme
themeSettings = conf... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 126 | 165 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:5:raw_corpus | raw_corpus | # Cancel timer
$timeout.cancel(scope.controlTimer) if scope.controlTimer?
# Uninitialize Masonry if still present
if $dashboardPageInner.data('masonry')
$dashboardPageInner.masonry('destroy')
return
} | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 167 | 175 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:5:completion | completion | # Cancel timer
$timeout.cancel(scope.controlTimer) if scope.controlTimer?
# Uninitialize Masonry if still present | if $dashboardPageInner.data('masonry')
$dashboardPageInner.masonry('destroy')
return
} | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d6074320b57a8763c1fbff5ef45de0f9bc4e6752 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d6074320b57a8763c1fbff5ef45de0f9bc4e6752/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 167 | 175 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:raw_corpus | raw_corpus | #
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 126 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
... | // Configure Dashboard Controls
calculateMouseTarget();
// Bind mousemove event for entire document (remove during $destroy)
$(document).on('mousemove', controlHitTest);
$(document).on('scroll', calculateMouseTarget);
// Watch the dashboard page and update the layout
scope.$watch('page', function(newValue, oldV... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 126 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Configure Dashboard Controls
calculateMouseTarget();
// Bind mousemove event for entire document (remove during $destroy)
$(document).on('mousemove', controlHitTest);
$(document).on('scroll', calculateMouseTarget);
// Watch the dashboard page and update t... | #
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 126 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:completion | completion | #
# Configure Dashboard Controls
#
calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
$(document).on 'scroll', calculateMouseTarget
... | updateLayout = ->
scope.postLayout = _.after newValue.widgets.length, ->
if (newValue.enableMasonry != false)
masonry(element, scope.layout)
scope.layout = layoutService.getLayout(newValue, $($window).width(), $($window).height... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 126 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:raw_corpus | raw_corpus | # Store updated hit target for the dashboard controls
calculateMouseTarget()
# Update everything
updateLayout()
resizeFunction = _.throttle(->
scope.$apply(updateLayout)
, 65)
# Update on window r... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 128 | 168 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:completion | completion | # Store updated hit target for the dashboard controls
calculateMouseTarget()
# Update everything
updateLayout()
resizeFunction = _.throttle(->
scope.$apply(updateLayout)
, 65)
# Update on window r... | # Set dashboard background color from theme
themeSettings = configService.dashboard.properties.theme.options[newValue.theme]
if newValue.theme? and themeSettings?
color = themeSettings.dashboardBackgroundColor
$('.dashboard, html').css('background-... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/d57e1ea8a1e73bb1b98d5b0d7b80dc356b595ce1/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 128 | 168 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:raw_corpus | raw_corpus | calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height()
padX = configService.dashboard.control... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height... | var calculateMouseTarget, controlHitTest, makeControlsAppear, makeControlsDisappear;
calculateMouseTarget = function() {
var controlHeight, controlOffset, controlWidth, padX, padY;
// Get all dimensions and the padding options
controlOffset = $dashboardControls.offset();
controlWidth = $dashboardControls.width... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var calculateMouseTarget, controlHitTest, makeControlsAppear, makeControlsDisappear;
calculateMouseTarget = function() {
var controlHeight, controlOffset, controlWidth, padX, padY;
// Get all dimensions and the padding options
controlOffset = $dashboardContr... | calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height()
padX = configService.dashboard.control... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:2:completion | completion | calculateMouseTarget = ->
# Get all dimensions and the padding options
controlOffset = $dashboardControls.offset()
controlWidth = $dashboardControls.width()
controlHeight = $dashboardControls.height()
padX = configService.dashboard.control... | makeControlsAppear = _.throttle(->
# Make visible
$dashboardControls.addClass 'active'
# Set timer to remove the controls after some delay
$timeout.cancel(scope.controlTimer) if scope.controlTimer?
scope.controlTimer = $timeout(makeContro... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 45 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:raw_corpus | raw_corpus | #
# Configure Dashboard Controls
#
scope.controlTarget = calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
#
# Watch the d... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#
# Configure Dashboard Controls
#
scope.controlTarget = calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove'... | // Configure Dashboard Controls
scope.controlTarget = calculateMouseTarget();
// Bind mousemove event for entire document (remove during $destroy)
$(document).on('mousemove', controlHitTest);
// Watch the dashboard page and update the layout
scope.$watch('page', function(newValue, oldValue) {
var resizeFunctio... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Configure Dashboard Controls
scope.controlTarget = calculateMouseTarget();
// Bind mousemove event for entire document (remove during $destroy)
$(document).on('mousemove', controlHitTest);
// Watch the dashboard page and update the layout
scope.$watch('pa... | #
# Configure Dashboard Controls
#
scope.controlTarget = calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
#
# Watch the d... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:3:completion | completion | #
# Configure Dashboard Controls
#
scope.controlTarget = calculateMouseTarget()
#
# Bind mousemove event for entire document (remove during $destroy)
#
$(document).on 'mousemove', controlHitTest
#
# Watch the d... | scope.postLayout = _.after newValue.widgets.length, ->
if (newValue.enableMasonry != false)
masonry(element, scope.layout)
scope.layout = layoutService.getLayout(newValue, $($window).width(), $($window).height())
# Set page ma... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 86 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:raw_corpus | raw_corpus | # Update on window resizing
$(window).on 'resize', resizeFunction
scope.$on '$destroy', ->
$(window).off 'resize', resizeFunction
# Apply page theme class to dashboard-controls
$dashboardControls.addClass('dashboard-' + newValue.theme... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 126 | 157 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee:4:completion | completion | # Update on window resizing
$(window).on 'resize', resizeFunction
scope.$on '$destroy', ->
$(window).off 'resize', resizeFunction
# Apply page theme class to dashboard-controls
$dashboardControls.addClass('dashboard-' + newValue.theme... | #
# Cleanup
#
scope.$on '$destroy', ->
$(document).off 'mousemove', controlHitTest
# Cancel timer
$timeout.cancel(scope.controlTimer) if scope.controlTimer?
# Uninitialize Masonry if still present
if $d... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/dashboards/directives/directives.dashboardPage.coffee | 126 | 157 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:1:raw_corpus | raw_corpus | exports.group_block_trees = (block_trees) ->
blocks = block_trees.map (t) -> t.block
# union-find
groups = new Map(block_trees.map((block_tree) ->
group = {block: block_tree.block, tree: block_tree, overlaps: new Set()}
group.parent = group
return [block_tree.block, group]
))
... | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 13 | 46 | ||
Pagedraw/pagedraw:src/overlapping-layout.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.group_block_trees = (block_trees) ->
blocks = block_trees.map (t) -> t.block
# union-find
groups = new Map(block_trees.map((block_tree) ->
group = {block: block_tree.block, tree: block_tree, overlaps: new Set()}
group.parent =... | exports.group_block_trees = function(block_trees) {
var blocks, group_parent, groups, join_group, sets;
blocks = block_trees.map(function(t) {
return t.block;
});
// union-find
groups = new Map(block_trees.map(function(block_tree) {
var group;
group = {
block: block_tree.block,
tree: b... | CoffeeScript | JavaScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 13 | 46 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.group_block_trees = function(block_trees) {
var blocks, group_parent, groups, join_group, sets;
blocks = block_trees.map(function(t) {
return t.block;
});
// union-find
groups = new Map(block_trees.map(function(block_tree) {
var group;
... | exports.group_block_trees = (block_trees) ->
blocks = block_trees.map (t) -> t.block
# union-find
groups = new Map(block_trees.map((block_tree) ->
group = {block: block_tree.block, tree: block_tree, overlaps: new Set()}
group.parent = group
return [block_tree.block, group]
))
... | JavaScript | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 13 | 46 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:1:completion | completion | exports.group_block_trees = (block_trees) ->
blocks = block_trees.map (t) -> t.block
# union-find
groups = new Map(block_trees.map((block_tree) ->
group = {block: block_tree.block, tree: block_tree, overlaps: new Set()}
group.parent = group
return [block_tree.block, group]
))
... | else join_group(group, to.parent)
blocks.forEach (block) ->
own_group = groups.get(block)
blocks.forEach (other_block) ->
other_group = groups.get(other_block)
if block != other_block and blocks_overlap_on_both_axes(block, other_block)
own_group.overlaps.add(... | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 13 | 46 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:2:raw_corpus | raw_corpus | exports.resolve_block_group = (group) ->
unannotated_group = group.map (b) -> b.tree
# identify special cases and resolve them
if group.length == 2
block_a = group[0].tree.block
block_b = group[1].tree.block
enclosure_directions = _l.compact ['horizontal', 'vertical'].map (dir) ->
... | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 49 | 98 | ||
Pagedraw/pagedraw:src/overlapping-layout.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.resolve_block_group = (group) ->
unannotated_group = group.map (b) -> b.tree
# identify special cases and resolve them
if group.length == 2
block_a = group[0].tree.block
block_b = group[1].tree.block
enclosure_directio... | var indexOf = [].indexOf;
exports.resolve_block_group = function(group) {
var block_a, block_b, block_c, containee, container, enclosure_direction, enclosure_directions, enclosures, end, overlaps, overlaps_b, reverse_enclosure_directions, sorted_by_overlap_count, start, unannotated_group;
unannotated_group = group... | CoffeeScript | JavaScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 49 | 98 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var indexOf = [].indexOf;
exports.resolve_block_group = function(group) {
var block_a, block_b, block_c, containee, container, enclosure_direction, enclosure_directions, enclosures, end, overlaps, overlaps_b, reverse_enclosure_directions, sorted_by_overlap_count... | exports.resolve_block_group = (group) ->
unannotated_group = group.map (b) -> b.tree
# identify special cases and resolve them
if group.length == 2
block_a = group[0].tree.block
block_b = group[1].tree.block
enclosure_directions = _l.compact ['horizontal', 'vertical'].map (dir) ->
... | JavaScript | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 49 | 98 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:2:completion | completion | exports.resolve_block_group = (group) ->
unannotated_group = group.map (b) -> b.tree
# identify special cases and resolve them
if group.length == 2
block_a = group[0].tree.block
block_b = group[1].tree.block
enclosure_directions = _l.compact ['horizontal', 'vertical'].map (dir) ->
... | { start, end } = block_props_by_direction(opposite_direction(enclosure_direction))
if ((start in overlaps) and not (end in overlaps)) or ((not (start in overlaps)) and (end in overlaps))
return {group: unannotated_group, negative_margins: opposite_direction(enclosure_direction)}
if ... | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 49 | 98 |
Pagedraw/pagedraw:src/overlapping-layout.coffee:3:raw_corpus | raw_corpus | overlaps_c = overlap_sides(block_c, block_a)
# if overlaps are all along the same axis and on opposite sides of the middle block
if _l.every [
overlaps_b.length == 1
overlaps_c.length == 1
overlaps_b[0] == opposite_side(overlaps_c[0])
... | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 99 | 117 | ||
Pagedraw/pagedraw:src/overlapping-layout.coffee:3:completion | completion | overlaps_c = overlap_sides(block_c, block_a)
# if overlaps are all along the same axis and on opposite sides of the middle block
if _l.every [
overlaps_b.length == 1
overlaps_c.length == 1
overlaps_b[0] == opposite_side(overlaps_c[0])
... | { length } = block_props_by_direction(direction_across_group)
if block_b[length] >= block_a[length] and block_c[length] >= block_a[length]
return {group: unannotated_group, negative_margins: direction_from_side(overlaps_b[0])}
# potential cases to handle:
... | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | src/overlapping-layout.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/overlapping-layout.coffee | 99 | 117 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:2:raw_corpus | raw_corpus | loadTeam = (_teamId, _roomId, searchQuery) ->
teamActions.teamsFetch (resp) ->
if resp.length is 0
routerHandlers.settingTeams()
else
if _teamId? and (_teamId in resp.map(getId))
teamActions.teamTopics _teamId, (teamData) ->
targetRoom = query.topicsByOne recorder.getState(), _te... | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 22 | 37 | ||
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
loadTeam = (_teamId, _roomId, searchQuery) ->
teamActions.teamsFetch (resp) ->
if resp.length is 0
routerHandlers.settingTeams()
else
if _teamId? and (_teamId in resp.map(getId))
teamActions.teamTopics _teamId, (teamData) ->
... | var loadTeam,
indexOf = [].indexOf;
loadTeam = function(_teamId, _roomId, searchQuery) {
return teamActions.teamsFetch(function(resp) {
if (resp.length === 0) {
return routerHandlers.settingTeams();
} else {
if ((_teamId != null) && (indexOf.call(resp.map(getId), _teamId) >= 0)) {
retur... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 22 | 37 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var loadTeam,
indexOf = [].indexOf;
loadTeam = function(_teamId, _roomId, searchQuery) {
return teamActions.teamsFetch(function(resp) {
if (resp.length === 0) {
return routerHandlers.settingTeams();
} else {
if ((_teamId != null) && (indexO... | loadTeam = (_teamId, _roomId, searchQuery) ->
teamActions.teamsFetch (resp) ->
if resp.length is 0
routerHandlers.settingTeams()
else
if _teamId? and (_teamId in resp.map(getId))
teamActions.teamTopics _teamId, (teamData) ->
targetRoom = query.topicsByOne recorder.getState(), _te... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 22 | 37 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:2:completion | completion | loadTeam = (_teamId, _roomId, searchQuery) ->
teamActions.teamsFetch (resp) ->
if resp.length is 0
routerHandlers.settingTeams()
else
if _teamId? and (_teamId in resp.map(getId))
teamActions.teamTopics _teamId, (teamData) ->
targetRoom = query.topicsByOne recorder.getState(), _te... | if targetRoom?
routerHandlers.room _teamId, targetRoom.get('_id'), searchQuery
else
generalRoom = query.topicsByOne recorder.getState(), _teamId
routerHandlers.room _teamId, generalRoom.get('_id')
analytics.enterTeam()
else
routerHandlers.settingTeam... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 22 | 37 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:4:raw_corpus | raw_corpus | loadStory = (_teamId, _storyId, searchQuery) ->
storyActions.readone _storyId
, ->
routerHandlers.story _teamId, _storyId, searchQuery
, ->
routerHandlers.home() | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 42 | 47 | ||
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
loadStory = (_teamId, _storyId, searchQuery) ->
storyActions.readone _storyId
, ->
routerHandlers.story _teamId, _storyId, searchQuery
, ->
routerHandlers.home()
``` | var loadStory;
loadStory = function(_teamId, _storyId, searchQuery) {
return storyActions.readone(_storyId, function() {
return routerHandlers.story(_teamId, _storyId, searchQuery);
}, function() {
return routerHandlers.home();
});
}; | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 42 | 47 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var loadStory;
loadStory = function(_teamId, _storyId, searchQuery) {
return storyActions.readone(_storyId, function() {
return routerHandlers.story(_teamId, _storyId, searchQuery);
}, function() {
return routerHandlers.home();
});
};
``` | loadStory = (_teamId, _storyId, searchQuery) ->
storyActions.readone _storyId
, ->
routerHandlers.story _teamId, _storyId, searchQuery
, ->
routerHandlers.home() | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 42 | 47 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:4:completion | completion | loadStory = (_teamId, _storyId, searchQuery) ->
storyActions.readone _storyId
, -> | routerHandlers.story _teamId, _storyId, searchQuery
, ->
routerHandlers.home() | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 42 | 47 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:5:raw_corpus | raw_corpus | exports.loadPage = loadPage = (preference, defaultRouteInfo) ->
_toId = defaultRouteInfo.getIn(['data', '_toId'])
_roomId = defaultRouteInfo.getIn(['data', '_roomId'])
_teamId = defaultRouteInfo.getIn(['data', '_teamId']) or preference._latestTeamId
_storyId = defaultRouteInfo.getIn(['data', '_storyId'])
sear... | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 49 | 98 | ||
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.loadPage = loadPage = (preference, defaultRouteInfo) ->
_toId = defaultRouteInfo.getIn(['data', '_toId'])
_roomId = defaultRouteInfo.getIn(['data', '_roomId'])
_teamId = defaultRouteInfo.getIn(['data', '_teamId']) or preference._latestTeamId
_stor... | var loadPage;
exports.loadPage = loadPage = function(preference, defaultRouteInfo) {
var _roomId, _storyId, _teamId, _toId, searchQuery;
_toId = defaultRouteInfo.getIn(['data', '_toId']);
_roomId = defaultRouteInfo.getIn(['data', '_roomId']);
_teamId = defaultRouteInfo.getIn(['data', '_teamId']) || preference.... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 49 | 98 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var loadPage;
exports.loadPage = loadPage = function(preference, defaultRouteInfo) {
var _roomId, _storyId, _teamId, _toId, searchQuery;
_toId = defaultRouteInfo.getIn(['data', '_toId']);
_roomId = defaultRouteInfo.getIn(['data', '_roomId']);
_teamId = def... | exports.loadPage = loadPage = (preference, defaultRouteInfo) ->
_toId = defaultRouteInfo.getIn(['data', '_toId'])
_roomId = defaultRouteInfo.getIn(['data', '_roomId'])
_teamId = defaultRouteInfo.getIn(['data', '_teamId']) or preference._latestTeamId
_storyId = defaultRouteInfo.getIn(['data', '_storyId'])
sear... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 49 | 98 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:5:completion | completion | exports.loadPage = loadPage = (preference, defaultRouteInfo) ->
_toId = defaultRouteInfo.getIn(['data', '_toId'])
_roomId = defaultRouteInfo.getIn(['data', '_roomId'])
_teamId = defaultRouteInfo.getIn(['data', '_teamId']) or preference._latestTeamId
_storyId = defaultRouteInfo.getIn(['data', '_storyId'])
sear... | when 'create'
routerHandlers.create _teamId, searchQuery
when 'overview'
handlers.router.teamOverview _teamId
when 'mentions'
routerHandlers.mentions { _teamId }, searchQuery
when 'integrations'
routerHandlers.integrations _teamId, _roomId, searchQuery
# profile handler
w... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 49 | 98 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:6:raw_corpus | raw_corpus | when 'setting-team-create'
routerHandlers.teamCreate()
when 'setting-teams'
routerHandlers.settingTeams()
else
routerHandlers.settingTeams()
# steps entry | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 99 | 106 | ||
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:6:completion | completion | when 'setting-team-create'
routerHandlers.teamCreate()
when 'setting-teams'
routerHandlers.settingTeams() | else
routerHandlers.settingTeams()
# steps entry | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 99 | 106 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:7:raw_corpus | raw_corpus | exports.start = (defaultRouteInfo, cb) ->
userActions.userMe \
(resp) ->
socket.connect ->
loadPage(resp.preference, defaultRouteInfo)
cb() # using callback due to a popstate bug in safari
, (error) ->
cb() | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 108 | 116 | ||
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:7:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.start = (defaultRouteInfo, cb) ->
userActions.userMe \
(resp) ->
socket.connect ->
loadPage(resp.preference, defaultRouteInfo)
cb() # using callback due to a popstate bug in safari
, (error) ->
cb()
``` | exports.start = function(defaultRouteInfo, cb) {
return userActions.userMe(function(resp) {
return socket.connect(function() {
loadPage(resp.preference, defaultRouteInfo);
return cb(); // using callback due to a popstate bug in safari
});
}, function(error) {
return cb();
});
}; | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 108 | 116 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:7:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.start = function(defaultRouteInfo, cb) {
return userActions.userMe(function(resp) {
return socket.connect(function() {
loadPage(resp.preference, defaultRouteInfo);
return cb(); // using callback due to a popstate bug in safari
});
},... | exports.start = (defaultRouteInfo, cb) ->
userActions.userMe \
(resp) ->
socket.connect ->
loadPage(resp.preference, defaultRouteInfo)
cb() # using callback due to a popstate bug in safari
, (error) ->
cb() | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 108 | 116 |
jianliaoim/talk-os:talk-web/client/handlers/initialize.coffee:7:completion | completion | exports.start = (defaultRouteInfo, cb) ->
userActions.userMe \
(resp) -> | socket.connect ->
loadPage(resp.preference, defaultRouteInfo)
cb() # using callback due to a popstate bug in safari
, (error) ->
cb() | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/handlers/initialize.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/handlers/initialize.coffee | 108 | 116 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:raw_corpus | raw_corpus | module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
isDone: (particle) ->
particle.alpha <= 0.1
update: (particle) ->
particle.velocity.y += 0.075
particle.x += particle.velocity.x
particle.y += particle... | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect/default.coffee | 1 | 21 | ||
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
isDone: (particle) ->
particle.alpha <= 0.1
update: (particle) ->
particle.velocity.y += 0.075
par... | module.exports = {
title: 'Default effect',
description: 'Simple blaster effect.',
image: 'atom://activate-power-mode/images/default-effect.gif',
isDone: function(particle) {
return particle.alpha <= 0.1;
},
update: function(particle) {
particle.velocity.y += 0.075;
particle.x += particle.veloci... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect/default.coffee | 1 | 21 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = {
title: 'Default effect',
description: 'Simple blaster effect.',
image: 'atom://activate-power-mode/images/default-effect.gif',
isDone: function(particle) {
return particle.alpha <= 0.1;
},
update: function(particle) {
particle... | module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
isDone: (particle) ->
particle.alpha <= 0.1
update: (particle) ->
particle.velocity.y += 0.075
particle.x += particle.velocity.x
particle.y += particle... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect/default.coffee | 1 | 21 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:completion | completion | module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
isDone: (particle) ->
particle.alpha <= 0.1
update: (particle) ->
particle.velocity.y += 0.075 | particle.x += particle.velocity.x
particle.y += particle.velocity.y
particle.alpha *= 0.96
draw: (particle, context) ->
context.fillStyle = "rgba(#{particle.color[4...-1]}, #{particle.alpha})"
context.fillRect(
Math.round(particle.x - particle.size / 2)
Math.round(particle.y - particle.si... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect/default.coffee | 1 | 21 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:raw_corpus | raw_corpus | random = require "lodash.random"
module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
init: ->
@reset()
disable: ->
@reset()
reset: ->
@particles = []
spawn: (position, colorGenerate, input, randomSize... | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | 70cdc43d6acba3bde34121da4c0984bf0bf272fa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/effect/default.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
random = require "lodash.random"
module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
init: ->
@reset()
disable: ->
@reset()
reset: ->
@particles =... | var random;
random = require("lodash.random");
module.exports = {
title: 'Default effect',
description: 'Simple blaster effect.',
image: 'atom://activate-power-mode/images/default-effect.gif',
init: function() {
return this.reset();
},
disable: function() {
return this.reset();
},
reset: funct... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | 70cdc43d6acba3bde34121da4c0984bf0bf272fa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/effect/default.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var random;
random = require("lodash.random");
module.exports = {
title: 'Default effect',
description: 'Simple blaster effect.',
image: 'atom://activate-power-mode/images/default-effect.gif',
init: function() {
return this.reset();
},
disable: fu... | random = require "lodash.random"
module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
init: ->
@reset()
disable: ->
@reset()
reset: ->
@particles = []
spawn: (position, colorGenerate, input, randomSize... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | 70cdc43d6acba3bde34121da4c0984bf0bf272fa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/effect/default.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:completion | completion | random = require "lodash.random"
module.exports =
title: 'Default effect'
description: 'Simple blaster effect.'
image: 'atom://activate-power-mode/images/default-effect.gif'
init: ->
@reset()
disable: ->
@reset()
reset: ->
@particles = []
spawn: (position, colorGenerate, input, randomSize... | x: x
y: y
alpha: 1
color: colorGenerate()
size: randomSize()
velocity:
x: -1 + Math.random() * 2
y: -3.5 + Math.random() * 2
animate: (context) ->
return if not @particles.length
gco = context.globalCompositeOperation
context.globalCompositeOperation = "lighter"
for ... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | 70cdc43d6acba3bde34121da4c0984bf0bf272fa | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/70cdc43d6acba3bde34121da4c0984bf0bf272fa/lib/effect/default.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:raw_corpus | raw_corpus | random = require "lodash.random"
module.exports =
init: ->
@reset()
disable: ->
@reset()
reset: ->
@particles = []
spawn: (position, colorGenerate, input, randomSize, conf) ->
@conf = conf
numParticles = random @conf['spawnCount.min'], @conf['spawnCount.max']
while numParticles--
... | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | edebf788a5c09ee191305e7c9d3a646807ed4c27 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/edebf788a5c09ee191305e7c9d3a646807ed4c27/lib/effect/default.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/effect/default.coffee:1:completion | completion | random = require "lodash.random"
module.exports =
init: ->
@reset()
disable: ->
@reset()
reset: ->
@particles = []
spawn: (position, colorGenerate, input, randomSize, conf) ->
@conf = conf
numParticles = random @conf['spawnCount.min'], @conf['spawnCount.max']
while numParticles--
... | size: randomSize()
velocity:
x: -1 + Math.random() * 2
y: -3.5 + Math.random() * 2
animate: (context) ->
return if not @particles.length
gco = context.globalCompositeOperation
context.globalCompositeOperation = "lighter"
for i in [@particles.length - 1 ..0]
particle = @particl... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect/default.coffee | MIT | edebf788a5c09ee191305e7c9d3a646807ed4c27 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/edebf788a5c09ee191305e7c9d3a646807ed4c27/lib/effect/default.coffee | 1 | 50 |
mojotech/pioneer:src/config_builder.coffee:1:raw_corpus | raw_corpus | module.exports =
convertToExecOptions: (objArry, libPath) ->
execOptions =
_.map objArry, (val) =>
k = _.keys(val)[0]
switch
when k is 'tags'
"--#{k}=".concat(
(_(Array::concat(val[k]))
.flatten()
.value())
.join(... | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 25 | 74 | ||
mojotech/pioneer:src/config_builder.coffee:1:completion | completion | module.exports =
convertToExecOptions: (objArry, libPath) ->
execOptions =
_.map objArry, (val) =>
k = _.keys(val)[0]
switch
when k is 'tags'
"--#{k}=".concat(
(_(Array::concat(val[k]))
.flatten()
.value())
.join(... | if @isCucumberFormatter(v)
"--format=#{v}"
else if fs.existsSync(p = path.join(process.cwd(), v))
"--format=#{p}"
else
"--format=#{path.join(libPath, v)}"
when k is 'preventReload'
v = val[k]
switch
when ... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 25 | 74 |
mojotech/pioneer:src/config_builder.coffee:2:raw_corpus | raw_corpus | val[k].reduce((p, v) ->
p.concat("--require", v)
, [])
else
if k?
"--#{k}=#{val[k]}"
else
""
_(["--require", path.join(libPath, "support")])
.concat(execOptions)
.flatten()
.compact()
.tap( (arr) -> arr.splice(... | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 75 | 124 | ||
mojotech/pioneer:src/config_builder.coffee:2:completion | completion | val[k].reduce((p, v) ->
p.concat("--require", v)
, [])
else
if k?
"--#{k}=#{val[k]}"
else
""
_(["--require", path.join(libPath, "support")])
.concat(execOptions)
.flatten()
.compact()
.tap( (arr) -> arr.splice(... | if name is 'require' and config[name]?
obj[name] = Array::concat(obj[name]).concat(config[name])
else if config[name]?
obj[name] = config[name]
if obj[name]? then obj else null
)
.compact()
.value()
if(!@hasFeature(options))
if(fs.existsSync(path.join(process.cwd(),... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 75 | 124 |
mojotech/pioneer:src/config_builder.coffee:3:raw_corpus | raw_corpus | _.forEach options, (opt) =>
k = _.keys(opt)[0]
if(k == 'feature')
r = true
r
isCucumberFormatter: (formatter) ->
!!(_.find(CUCUMBER_FORMATTERS, (f) -> f is formatter)) | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 125 | 133 | ||
mojotech/pioneer:src/config_builder.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_.forEach options, (opt) =>
k = _.keys(opt)[0]
if(k == 'feature')
r = true
r
isCucumberFormatter: (formatter) ->
!!(_.find(CUCUMBER_FORMATTERS, (f) -> f is formatter))
``` | _.forEach(options, (opt) => {
var k, r;
k = _.keys(opt)[0];
if (k === 'feature') {
return r = true;
}
});
r;
({
isCucumberFormatter: function(formatter) {
return !!(_.find(CUCUMBER_FORMATTERS, function(f) {
return f === formatter;
}));
}
}); | CoffeeScript | JavaScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 125 | 133 |
mojotech/pioneer:src/config_builder.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
_.forEach(options, (opt) => {
var k, r;
k = _.keys(opt)[0];
if (k === 'feature') {
return r = true;
}
});
r;
({
isCucumberFormatter: function(formatter) {
return !!(_.find(CUCUMBER_FORMATTERS, function(f) {
return f === formatter;
}));... | _.forEach options, (opt) =>
k = _.keys(opt)[0]
if(k == 'feature')
r = true
r
isCucumberFormatter: (formatter) ->
!!(_.find(CUCUMBER_FORMATTERS, (f) -> f is formatter)) | JavaScript | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 125 | 133 |
mojotech/pioneer:src/config_builder.coffee:3:completion | completion | _.forEach options, (opt) =>
k = _.keys(opt)[0]
if(k == 'feature')
r = true | r
isCucumberFormatter: (formatter) ->
!!(_.find(CUCUMBER_FORMATTERS, (f) -> f is formatter)) | CoffeeScript | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/src/config_builder.coffee | 125 | 133 |
mojotech/pioneer:src/config_builder.coffee:1:raw_corpus | raw_corpus | module.exports =
convertToExecOptions: (objArry, libPath) ->
execOptions =
_.map objArry, (val) =>
k = _.keys(val)[0]
switch
when k is 'tags'
"--#{k}=".concat(
(_(Array::concat(val[k]))
.flatten()
.value())
.join(... | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 3f5ba5b0a07aa4d1d785d6e013382645df090ea8 | 523 | https://github.com/mojotech/pioneer/blob/3f5ba5b0a07aa4d1d785d6e013382645df090ea8/src/config_builder.coffee | 25 | 74 | ||
mojotech/pioneer:src/config_builder.coffee:1:completion | completion | module.exports =
convertToExecOptions: (objArry, libPath) ->
execOptions =
_.map objArry, (val) =>
k = _.keys(val)[0]
switch
when k is 'tags'
"--#{k}=".concat(
(_(Array::concat(val[k]))
.flatten()
.value())
.join(... | if @isCucumberFormatter(v)
"--format=#{v}"
else if fs.existsSync(p = path.join(process.cwd(), v))
"--format=#{p}"
else
"--format=#{path.join(libPath, v)}"
when k is 'preventReload'
v = val[k]
switch
when ... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/config_builder.coffee | MIT | 3f5ba5b0a07aa4d1d785d6e013382645df090ea8 | 523 | https://github.com/mojotech/pioneer/blob/3f5ba5b0a07aa4d1d785d6e013382645df090ea8/src/config_builder.coffee | 25 | 74 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.