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
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Controller; Controller = class Controller { constructor($log, $location, personService) { var setPeople; setPeople = () => { return personService.get().then((results) => { return this.people = results; }); }; this.insertPe...
class Controller constructor: ($log, $location, personService) -> setPeople = => personService.get().then (results) => @people = results @insertPerson = (person) => personService.save(person) .success (results) => @error = '' @person = {} setPeople() .error (results, status) => if...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
3d326c4da4d180fd2b3db82b132bb418234ccdab
672
https://github.com/CaryLandholt/AngularFun/blob/3d326c4da4d180fd2b3db82b132bb418234ccdab/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
class Controller constructor: ($log, $location, personService) -> setPeople = => personService.get().then (results) => @people = results @insertPerson = (person) => personService.save(person) .success (results) => @error = '' @person = {}
setPeople() .error (results, status) => if status is 403 @error = results .then (results) -> results setPeople() angular.module('app').controller 'personController', ['$log', '$location', 'personService', Controller]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
3d326c4da4d180fd2b3db82b132bb418234ccdab
672
https://github.com/CaryLandholt/AngularFun/blob/3d326c4da4d180fd2b3db82b132bb418234ccdab/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
class PersonController constructor: ($log, $location, personService) -> setPeople = => personService.get().then (results) => @people = results @insertPerson = (person) => personService.save(person) .success (results) => @error = '' @person = {} setPeople() .error (results, status) => ...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
b84573eefed26945462825227688b2e2fd24cfc8
672
https://github.com/CaryLandholt/AngularFun/blob/b84573eefed26945462825227688b2e2fd24cfc8/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class PersonController constructor: ($log, $location, personService) -> setPeople = => personService.get().then (results) => @people = results @insertPerson = (person) => personService.save(person) .success (results) => @error = '' @per...
var PersonController; PersonController = class PersonController { constructor($log, $location, personService) { var setPeople; setPeople = () => { return personService.get().then((results) => { return this.people = results; }); }; this.insertPerson = (person) => { return per...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
b84573eefed26945462825227688b2e2fd24cfc8
672
https://github.com/CaryLandholt/AngularFun/blob/b84573eefed26945462825227688b2e2fd24cfc8/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PersonController; PersonController = class PersonController { constructor($log, $location, personService) { var setPeople; setPeople = () => { return personService.get().then((results) => { return this.people = results; }); };...
class PersonController constructor: ($log, $location, personService) -> setPeople = => personService.get().then (results) => @people = results @insertPerson = (person) => personService.save(person) .success (results) => @error = '' @person = {} setPeople() .error (results, status) => ...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
b84573eefed26945462825227688b2e2fd24cfc8
672
https://github.com/CaryLandholt/AngularFun/blob/b84573eefed26945462825227688b2e2fd24cfc8/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
class PersonController constructor: ($log, $location, personService) -> setPeople = => personService.get().then (results) => @people = results @insertPerson = (person) => personService.save(person) .success (results) => @error = '' @person = {}
setPeople() .error (results, status) => if status is 403 @error = results .then (results) -> results setPeople() angular.module('app').controller 'personController', ['$log', '$location', 'personService', PersonController]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
b84573eefed26945462825227688b2e2fd24cfc8
672
https://github.com/CaryLandholt/AngularFun/blob/b84573eefed26945462825227688b2e2fd24cfc8/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) => @error = '' @person = {} @people = personService.get() , (results) => if results.status is 403 @error = resu...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/controllers/personController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) => @error = '' @person = {} @people = personService.get() , (re...
var PersonController; PersonController = class PersonController { constructor($log, $location, personService) { this.people = personService.get(); this.insertPerson = (person) => { return personService.save(person).then((results) => { this.error = ''; this.person = {}; return th...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/controllers/personController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var PersonController; PersonController = class PersonController { constructor($log, $location, personService) { this.people = personService.get(); this.insertPerson = (person) => { return personService.save(person).then((results) => { this....
class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) => @error = '' @person = {} @people = personService.get() , (results) => if results.status is 403 @error = resu...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/controllers/personController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) =>
@error = '' @person = {} @people = personService.get() , (results) => if results.status is 403 @error = results.data angular.module('app').controller 'personController', ['$log', '$location', 'personService', PersonController]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/controllers/personController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
do (angular) -> 'use strict' class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) => @error = '' @person = {} @people = personService.get() , (results) => i...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/controllers/personController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do (angular) -> 'use strict' class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) => @error = '' @person = {} ...
(function(angular) { 'use strict'; var PersonController; PersonController = class PersonController { constructor($log, $location, personService) { this.people = personService.get(); this.insertPerson = (person) => { return personService.save(person).then((results) => { this.error...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/controllers/personController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function(angular) { 'use strict'; var PersonController; PersonController = class PersonController { constructor($log, $location, personService) { this.people = personService.get(); this.insertPerson = (person) => { return personServic...
do (angular) -> 'use strict' class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person) .then (results) => @error = '' @person = {} @people = personService.get() , (results) => i...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/controllers/personController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
do (angular) -> 'use strict' class PersonController constructor: ($log, $location, personService) -> @people = personService.get() @insertPerson = (person) => personService.save(person)
.then (results) => @error = '' @person = {} @people = personService.get() , (results) => if results.status is 403 @error = results.data angular.module('app').controller 'personController', ['$log', '$location', 'personService', PersonController]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/controllers/personController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.error = '' $scope.person = {} $scope.people.push resul...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc
672
https://github.com/CaryLandholt/AngularFun/blob/dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.erro...
angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { return personService.save(person).then(function(results) { $scope.e...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc
672
https://github.com/CaryLandholt/AngularFun/blob/dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { return personService...
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.error = '' $scope.person = {} $scope.people.push resul...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc
672
https://github.com/CaryLandholt/AngularFun/blob/dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.error = '' $scope.person = {}
$scope.people.push results $location.path "/people/#{results.id}" , (results) -> ($scope.error = results.data) if results.status is 403 personService.get().then (results) -> $scope.people = results ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc
672
https://github.com/CaryLandholt/AngularFun/blob/dcbe4ff9e30f1cc3a6d7e4dde37180b7202077cc/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.error = '' $scope.person = {} $scope.people.push perso...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
a63d2a284d018f3a58ac10d805fd689faf36ebd7
672
https://github.com/CaryLandholt/AngularFun/blob/a63d2a284d018f3a58ac10d805fd689faf36ebd7/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.erro...
angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { return personService.save(person).then(function(results) { $scope.e...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
a63d2a284d018f3a58ac10d805fd689faf36ebd7
672
https://github.com/CaryLandholt/AngularFun/blob/a63d2a284d018f3a58ac10d805fd689faf36ebd7/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { return personService...
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.error = '' $scope.person = {} $scope.people.push perso...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
a63d2a284d018f3a58ac10d805fd689faf36ebd7
672
https://github.com/CaryLandholt/AngularFun/blob/a63d2a284d018f3a58ac10d805fd689faf36ebd7/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save(person).then (results) -> $scope.error = '' $scope.person = {}
$scope.people.push person $location.path "/people/#{person.id}" , (results) -> ($scope.error = results.data) if results.status is 403 personService.get().then (results) -> $scope.people = results ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
a63d2a284d018f3a58ac10d805fd689faf36ebd7
672
https://github.com/CaryLandholt/AngularFun/blob/a63d2a284d018f3a58ac10d805fd689faf36ebd7/src/scripts/controllers/personController.coffee
1
16
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> # personService.save person # , (person, getResponseHeaders) -> # $scope.error = '' # $scope.person = {} ...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
648c0624a6ff9c4540267dbd80d1290d130b0f2b
672
https://github.com/CaryLandholt/AngularFun/blob/648c0624a6ff9c4540267dbd80d1290d130b0f2b/src/scripts/controllers/personController.coffee
1
26
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> # personService.save person # , (person, getResponseHeade...
angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { // personService.save person // , (person, getResponseHeaders) -> ...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
648c0624a6ff9c4540267dbd80d1290d130b0f2b
672
https://github.com/CaryLandholt/AngularFun/blob/648c0624a6ff9c4540267dbd80d1290d130b0f2b/src/scripts/controllers/personController.coffee
1
26
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { // personService.sav...
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> # personService.save person # , (person, getResponseHeaders) -> # $scope.error = '' # $scope.person = {} ...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
648c0624a6ff9c4540267dbd80d1290d130b0f2b
672
https://github.com/CaryLandholt/AngularFun/blob/648c0624a6ff9c4540267dbd80d1290d130b0f2b/src/scripts/controllers/personController.coffee
1
26
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> # personService.save person # , (person, getResponseHeaders) -> # $scope.error = '' # $scope.person = {} ...
personService.save('person').then (results) -> $scope.error = '' $scope.person = {} $scope.people.push person $location.path "/people/#{person.id}" , (results) -> $log.error 'personController.save error', results personService.get().then (results) -> $scope.people = results ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
648c0624a6ff9c4540267dbd80d1290d130b0f2b
672
https://github.com/CaryLandholt/AngularFun/blob/648c0624a6ff9c4540267dbd80d1290d130b0f2b/src/scripts/controllers/personController.coffee
1
26
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save person , (person, getResponseHeaders) -> $scope.error = '' $scope.person = {} $scope....
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
ee3e13320b45929f8c738ee5b5ec26437044f1d4
672
https://github.com/CaryLandholt/AngularFun/blob/ee3e13320b45929f8c738ee5b5ec26437044f1d4/src/scripts/controllers/personController.coffee
1
17
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save person , (person, getResponseHeaders) ...
angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { return personService.save(person, function(person, getResponseHeaders) ...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
ee3e13320b45929f8c738ee5b5ec26437044f1d4
672
https://github.com/CaryLandholt/AngularFun/blob/ee3e13320b45929f8c738ee5b5ec26437044f1d4/src/scripts/controllers/personController.coffee
1
17
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.people = []; $scope.insertPerson = function(person) { return personService...
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save person , (person, getResponseHeaders) -> $scope.error = '' $scope.person = {} $scope....
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
ee3e13320b45929f8c738ee5b5ec26437044f1d4
672
https://github.com/CaryLandholt/AngularFun/blob/ee3e13320b45929f8c738ee5b5ec26437044f1d4/src/scripts/controllers/personController.coffee
1
17
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
angular.module('app').controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personService.save person , (person, getResponseHeaders) -> $scope.error = '' $scope.person = {}
$scope.people.push person $location.path "/people/#{person.id}" , (error) -> ($scope.error = error.data) if error.status is 403 personService.get (people) -> $scope.people = people ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
ee3e13320b45929f8c738ee5b5ec26437044f1d4
672
https://github.com/CaryLandholt/AngularFun/blob/ee3e13320b45929f8c738ee5b5ec26437044f1d4/src/scripts/controllers/personController.coffee
1
17
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:raw_corpus
raw_corpus
###global define### define ['controllers/controllers', 'services/personService'], (controllers) -> 'use strict' controllers.controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personS...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ###global define### define ['controllers/controllers', 'services/personService'], (controllers) -> 'use strict' controllers.controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.pe...
/*global define*/ define(['controllers/controllers', 'services/personService'], function(controllers) { 'use strict'; return controllers.controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $scope, $location, personService) { $scope.pe...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /*global define*/ define(['controllers/controllers', 'services/personService'], function(controllers) { 'use strict'; return controllers.controller('personController', [ '$log', '$scope', '$location', 'personService', function($log, $sco...
###global define### define ['controllers/controllers', 'services/personService'], (controllers) -> 'use strict' controllers.controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personS...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/controllers/personController.coffee
1
22
CaryLandholt/AngularFun:src/scripts/controllers/personController.coffee:1:completion
completion
###global define### define ['controllers/controllers', 'services/personService'], (controllers) -> 'use strict' controllers.controller 'personController', ['$log', '$scope', '$location', 'personService', ($log, $scope, $location, personService) -> $scope.people = [] $scope.insertPerson = (person) -> personS...
$scope.error = '' $scope.person = {} $scope.people.push person $location.path "/people/#{person.id}" , (error) -> ($scope.error = error.data) if error.status is 403 personService.get (people) -> $scope.people = people ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/controllers/personController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/controllers/personController.coffee
1
22
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:1:raw_corpus
raw_corpus
exports.postSave = (store, actionData) -> _teamId = actionData.get('_teamId') _channelId = actionData.get('_channelId') postData = actionData.get('post') dataPath = "#{_teamId}+#{_channelId}" store.setIn ['drafts', 'post', dataPath], postData exports.postDelete = (store, actionData) -> _teamId = actionDat...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
1
50
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.postSave = (store, actionData) -> _teamId = actionData.get('_teamId') _channelId = actionData.get('_channelId') postData = actionData.get('post') dataPath = "#{_teamId}+#{_channelId}" store.setIn ['drafts', 'post', dataPath], postData exports....
exports.postSave = function(store, actionData) { var _channelId, _teamId, dataPath, postData; _teamId = actionData.get('_teamId'); _channelId = actionData.get('_channelId'); postData = actionData.get('post'); dataPath = `${_teamId}+${_channelId}`; return store.setIn(['drafts', 'post', dataPath], postData); ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
1
50
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.postSave = function(store, actionData) { var _channelId, _teamId, dataPath, postData; _teamId = actionData.get('_teamId'); _channelId = actionData.get('_channelId'); postData = actionData.get('post'); dataPath = `${_teamId}+${_channelId}`; retur...
exports.postSave = (store, actionData) -> _teamId = actionData.get('_teamId') _channelId = actionData.get('_channelId') postData = actionData.get('post') dataPath = "#{_teamId}+#{_channelId}" store.setIn ['drafts', 'post', dataPath], postData exports.postDelete = (store, actionData) -> _teamId = actionDat...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
1
50
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:1:completion
completion
exports.postSave = (store, actionData) -> _teamId = actionData.get('_teamId') _channelId = actionData.get('_channelId') postData = actionData.get('post') dataPath = "#{_teamId}+#{_channelId}" store.setIn ['drafts', 'post', dataPath], postData exports.postDelete = (store, actionData) -> _teamId = actionDat...
_channelId = actionData.get('_channelId') dataPath = "#{_teamId}+#{_channelId}" store.deleteIn ['drafts', 'draft', dataPath] exports.snippetSave = (store, actionData) -> _teamId = actionData.get('_teamId') _channelId = actionData.get('_channelId') snippetData = actionData.get('snippet') dataPath = "#{_te...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
1
50
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:2:raw_corpus
raw_corpus
exports.deleteAllStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' store.deleteIn [ 'drafts', 'story', _teamId ] exports.updateStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' data = draftData.get 'data' category = draftData.get 'category' key = data.get('key') va...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
51
67
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.deleteAllStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' store.deleteIn [ 'drafts', 'story', _teamId ] exports.updateStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' data = draftData.get 'data' category...
exports.deleteAllStoryDraft = function(store, draftData) { var _teamId; _teamId = draftData.get('_teamId'); return store.deleteIn(['drafts', 'story', _teamId]); }; exports.updateStoryDraft = function(store, draftData) { var _teamId, category, data, key, value; _teamId = draftData.get('_teamId'); data = dra...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
51
67
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.deleteAllStoryDraft = function(store, draftData) { var _teamId; _teamId = draftData.get('_teamId'); return store.deleteIn(['drafts', 'story', _teamId]); }; exports.updateStoryDraft = function(store, draftData) { var _teamId, category, data, key, va...
exports.deleteAllStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' store.deleteIn [ 'drafts', 'story', _teamId ] exports.updateStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' data = draftData.get 'data' category = draftData.get 'category' key = data.get('key') va...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
51
67
jianliaoim/talk-os:talk-web/client/updater/draft.coffee:2:completion
completion
exports.deleteAllStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' store.deleteIn [ 'drafts', 'story', _teamId ] exports.updateStoryDraft = (store, draftData) -> _teamId = draftData.get '_teamId' data = draftData.get 'data'
category = draftData.get 'category' key = data.get('key') value = data.get('value') store.setIn [ 'drafts', 'story', _teamId, category, key ], value exports.toggleMarkdown = (store, status) -> store.setIn [ 'drafts', 'activeMarkdown' ], status
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/draft.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/draft.coffee
51
67
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2016-2018 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/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2016-2018 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/licens...
/* * Copyright (c) 2016-2018 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 applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2016-2018 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/li...
### # Copyright (c) 2016-2018 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 ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:completion
completion
### # Copyright (c) 2016-2018 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 ...
# cyclotronDataSources.factory 'cloudwatchDataSource', ($q, $http, configService, dataSourceFactory, logService) -> getProxyRequest = (options) -> options = _.compile options, {} url = new URI options.url # Add CloudWatch parameters to URL if options.parameters? compil...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:2:raw_corpus
raw_corpus
# Format: https://github.com/mikeal/request#requestoptions-callback proxyBody = url: url.toString() method: 'GET' json: true headers: 'Content-Type': 'application/json' if options.awsCredentials? # Add required properties for A...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
51
92
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:2:completion
completion
# Format: https://github.com/mikeal/request#requestoptions-callback proxyBody = url: url.toString() method: 'GET' json: true headers: 'Content-Type': 'application/json' if options.awsCredentials? # Add required properties for A...
return response.ListMetricsResponse.ListMetricsResult.Metrics; when 'GetMetricStatistics' return _.sortBy response.GetMetricStatisticsResponse.GetMetricStatisticsResult.Datapoints, 'Timestamp' else reject('Unknown Action value "' + action + '"') runner = (opt...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
51
92
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:3:raw_corpus
raw_corpus
if _.isNull data logService.debug 'CloudWatch result is null.' data = [] resolve { '0': data: data columns: null } else ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
94
124
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:3:completion
completion
if _.isNull data logService.debug 'CloudWatch result is null.' data = [] resolve { '0': data: data columns: null } else ...
# Generate proxy URLs proxyUri = new URI(_.jsExec(options.proxy) || configService.restServiceUrl) .protocol '' # Remove protocol to work with either HTTP/HTTPS .segment 'proxy' # Append /proxy endpoint .toString() # Do the request, wiring up s...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
94
124
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 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 or ag...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 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/mi...
/* * Copyright (c) 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 l...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 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/license...
### # Copyright (c) 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 or ag...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee:1:completion
completion
### # Copyright (c) 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 or ag...
# cyclotronDataSources.factory 'cloudwatchDataSource', ($q, $http, configService, dataSourceFactory, logService) -> getProxyRequest = (options) -> options = _.compile options, {} url = new URI options.url # Add CloudWatch parameters to URL if options.parameters? compil...
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
MIT
6aa99e4a06fb9bdc26f6769552b5d898e5ee1831
1,544
https://github.com/ExpediaGroup/cyclotron/blob/6aa99e4a06fb9bdc26f6769552b5d898e5ee1831/cyclotron-site/app/scripts/dashboards/dataSources/dataSources.cloudwatch.coffee
1
49
jnordberg/wintersmith:src/cli/common.coffee:1:raw_corpus
raw_corpus
exports.extendOptions = (base, extra) -> for type in ['string', 'boolean'] base[type] ?= [] if extra[type]? base[type] = base[type].concat extra[type] for type in ['alias', 'default'] base[type] ?= {} if extra[type]? base[type][key] = value for key, value of extra[type] return
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
36
45
jnordberg/wintersmith:src/cli/common.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.extendOptions = (base, extra) -> for type in ['string', 'boolean'] base[type] ?= [] if extra[type]? base[type] = base[type].concat extra[type] for type in ['alias', 'default'] base[type] ?= {} if extra[type]? base[type][key...
exports.extendOptions = function(base, extra) { var i, j, key, len, len1, ref, ref1, ref2, type, value; ref = ['string', 'boolean']; for (i = 0, len = ref.length; i < len; i++) { type = ref[i]; if (base[type] == null) { base[type] = []; } if (extra[type] != null) { base[type] = base[ty...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
36
45
jnordberg/wintersmith:src/cli/common.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.extendOptions = function(base, extra) { var i, j, key, len, len1, ref, ref1, ref2, type, value; ref = ['string', 'boolean']; for (i = 0, len = ref.length; i < len; i++) { type = ref[i]; if (base[type] == null) { base[type] = []; } ...
exports.extendOptions = (base, extra) -> for type in ['string', 'boolean'] base[type] ?= [] if extra[type]? base[type] = base[type].concat extra[type] for type in ['alias', 'default'] base[type] ?= {} if extra[type]? base[type][key] = value for key, value of extra[type] return
JavaScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
36
45
jnordberg/wintersmith:src/cli/common.coffee:1:completion
completion
exports.extendOptions = (base, extra) -> for type in ['string', 'boolean'] base[type] ?= [] if extra[type]? base[type] = base[type].concat extra[type]
for type in ['alias', 'default'] base[type] ?= {} if extra[type]? base[type][key] = value for key, value of extra[type] return
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
36
45
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
47
96
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
# don't include cli-specific options excluded = ['_', 'chdir', 'config', 'clean'] if key in excluded continue if key in ['port'] # numeric values value = Number value if key in ['ignore', 'require', 'plugins'] # split comma separated values to arra...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
47
96
jnordberg/wintersmith:src/cli/common.coffee:3:raw_corpus
raw_corpus
logger.verbose 'config:', config env = new Environment config, workDir, logger callback null, env (env, callback) -> # validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExis...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
97
146
jnordberg/wintersmith:src/cli/common.coffee:3:completion
completion
logger.verbose 'config:', config env = new Environment config, workDir, logger callback null, env (env, callback) -> # validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExis...
write: (string, encodig='utf8') -> @_write string, encodig, -> exports.NpmAdapter = class NpmAdapter extends stream.Writable ### Redirects output of npm to a logger ### constructor: (@logger) -> @buffer = '' super {decodeStrings: false} _write: (chunk, encoding, callback) -> @buffer += chunk ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
97
146
jnordberg/wintersmith:src/cli/common.coffee:4:raw_corpus
raw_corpus
exports.getStorageDir = -> ### Return users wintersmith directory, used for cache and user templates. ### return process.env.WINTERSMITH_PATH if process.env.WINTERSMITH_PATH? home = process.env.HOME or process.env.USERPROFILE dir = 'wintersmith' if process.platform isnt 'win32' dir = '.' + dir return pa...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
148
155
jnordberg/wintersmith:src/cli/common.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getStorageDir = -> ### Return users wintersmith directory, used for cache and user templates. ### return process.env.WINTERSMITH_PATH if process.env.WINTERSMITH_PATH? home = process.env.HOME or process.env.USERPROFILE dir = 'wintersmith' if proc...
exports.getStorageDir = function() { var dir, home; if (process.env.WINTERSMITH_PATH != null) { /* Return users wintersmith directory, used for cache and user templates. */ return process.env.WINTERSMITH_PATH; } home = process.env.HOME || process.env.USERPROFILE; dir = 'wintersmith'; if (process.pla...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
148
155
jnordberg/wintersmith:src/cli/common.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.getStorageDir = function() { var dir, home; if (process.env.WINTERSMITH_PATH != null) { /* Return users wintersmith directory, used for cache and user templates. */ return process.env.WINTERSMITH_PATH; } home = process.env.HOME || process.en...
exports.getStorageDir = -> ### Return users wintersmith directory, used for cache and user templates. ### return process.env.WINTERSMITH_PATH if process.env.WINTERSMITH_PATH? home = process.env.HOME or process.env.USERPROFILE dir = 'wintersmith' if process.platform isnt 'win32' dir = '.' + dir return pa...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
148
155
jnordberg/wintersmith:src/cli/common.coffee:4:completion
completion
exports.getStorageDir = -> ### Return users wintersmith directory, used for cache and user templates. ### return process.env.WINTERSMITH_PATH if process.env.WINTERSMITH_PATH? home = process.env.HOME or process.env.USERPROFILE
dir = 'wintersmith' if process.platform isnt 'win32' dir = '.' + dir return path.resolve(home, dir)
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/cli/common.coffee
148
155
jnordberg/wintersmith:src/cli/common.coffee:1:raw_corpus
raw_corpus
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
47b0e481b66a2f4607c4a0c667745ae2e7b0653a
3,484
https://github.com/jnordberg/wintersmith/blob/47b0e481b66a2f4607c4a0c667745ae2e7b0653a/src/cli/common.coffee
41
90
jnordberg/wintersmith:src/cli/common.coffee:1:completion
completion
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
# don't include optimist stuff and cli-specific options excluded = ['_', 'chdir', 'config', 'clean'] if key[0] is '$' or key.length is 1 or key in excluded continue if key in ['ignore', 'require', 'plugins'] # split comma separated values to arrays value = value.spl...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
47b0e481b66a2f4607c4a0c667745ae2e7b0653a
3,484
https://github.com/jnordberg/wintersmith/blob/47b0e481b66a2f4607c4a0c667745ae2e7b0653a/src/cli/common.coffee
41
90
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
(env, callback) -> # validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error ...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
47b0e481b66a2f4607c4a0c667745ae2e7b0653a
3,484
https://github.com/jnordberg/wintersmith/blob/47b0e481b66a2f4607c4a0c667745ae2e7b0653a/src/cli/common.coffee
91
136
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
(env, callback) -> # validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error ...
exports.NpmAdapter = class NpmAdapter extends stream.Writable ### Redirects output of npm to a logger ### constructor: (@logger) -> @buffer = '' super {decodeStrings: false} _write: (chunk, encoding, callback) -> @buffer += chunk @flush() if chunk.indexOf('\n') isnt -1 callback() flush: -...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
47b0e481b66a2f4607c4a0c667745ae2e7b0653a
3,484
https://github.com/jnordberg/wintersmith/blob/47b0e481b66a2f4607c4a0c667745ae2e7b0653a/src/cli/common.coffee
91
136
jnordberg/wintersmith:src/cli/common.coffee:1:raw_corpus
raw_corpus
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
2847bd4b4bbd0694c24c8381999c4c78665c1a3b
3,484
https://github.com/jnordberg/wintersmith/blob/2847bd4b4bbd0694c24c8381999c4c78665c1a3b/src/cli/common.coffee
41
90
jnordberg/wintersmith:src/cli/common.coffee:1:completion
completion
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
if key[0] is '$' or key.length is 1 or key in excluded continue if key in ['ignore', 'require', 'plugins'] # split comma separated values to arrays value = value.split ',' if key is 'require' # handle special alias:module mapping reqs = {} ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
2847bd4b4bbd0694c24c8381999c4c78665c1a3b
3,484
https://github.com/jnordberg/wintersmith/blob/2847bd4b4bbd0694c24c8381999c4c78665c1a3b/src/cli/common.coffee
41
90
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
# validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error "#{ pathname } path inval...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
2847bd4b4bbd0694c24c8381999c4c78665c1a3b
3,484
https://github.com/jnordberg/wintersmith/blob/2847bd4b4bbd0694c24c8381999c4c78665c1a3b/src/cli/common.coffee
91
135
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
# validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error "#{ pathname } path inval...
exports.NpmAdapter = class NpmAdapter extends stream.Writable ### Redirects output of npm to a logger ### constructor: (@logger) -> @buffer = '' super {decodeStrings: false} _write: (chunk, encoding, callback) -> @buffer += chunk @flush() if chunk.indexOf('\n') isnt -1 callback() flush: -...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
2847bd4b4bbd0694c24c8381999c4c78665c1a3b
3,484
https://github.com/jnordberg/wintersmith/blob/2847bd4b4bbd0694c24c8381999c4c78665c1a3b/src/cli/common.coffee
91
135
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
# validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error "#{ pathname } path inval...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
0a0cced94ce73210fec40832257d03b00f866207
3,484
https://github.com/jnordberg/wintersmith/blob/0a0cced94ce73210fec40832257d03b00f866207/src/cli/common.coffee
91
126
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
# validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error "#{ pathname } path inval...
@buffer = '' super {decodeStrings: false} _write: (chunk, encoding, callback) -> @buffer += chunk @flush() if chunk.indexOf('\n') isnt -1 callback() flush: -> lines = @buffer.split('\n') @buffer = '' for line in lines continue unless line.length > 0 line = line.replace /^np...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
0a0cced94ce73210fec40832257d03b00f866207
3,484
https://github.com/jnordberg/wintersmith/blob/0a0cced94ce73210fec40832257d03b00f866207/src/cli/common.coffee
91
126
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
# validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists callback() else callback new Error "#{ pathname } path inval...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
7af30c7e3ba9305d871f38b7845822cf3ff06bec
3,484
https://github.com/jnordberg/wintersmith/blob/7af30c7e3ba9305d871f38b7845822cf3ff06bec/src/cli/common.coffee
90
102
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
# validate paths paths = ['contents', 'templates'] async.forEach paths, (pathname, callback) -> resolved = env.resolvePath env.config[pathname] fileExists resolved , (exists) -> if exists
callback() else callback new Error "#{ pathname } path invalid (#{ resolved })" , (error) -> callback error, env ], callback
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
7af30c7e3ba9305d871f38b7845822cf3ff06bec
3,484
https://github.com/jnordberg/wintersmith/blob/7af30c7e3ba9305d871f38b7845822cf3ff06bec/src/cli/common.coffee
90
102
jnordberg/wintersmith:src/cli/common.coffee:1:raw_corpus
raw_corpus
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
a3ce2fed749a3e075ca7233fe93f4be3f167a7f1
3,484
https://github.com/jnordberg/wintersmith/blob/a3ce2fed749a3e075ca7233fe93f4be3f167a7f1/src/cli/common.coffee
40
89
jnordberg/wintersmith:src/cli/common.coffee:1:completion
completion
exports.loadEnv = (argv, callback) -> ### creates a new wintersmith environment options are resolved with the hierarchy: argv > configfile > defaults ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "creating environment - work directory: #{ workDir }" async.waterfall [ (call...
if key[0] is '$' or key.length is 1 or key in excluded continue if key in ['ignore', 'require', 'plugins'] # split comma separated values to arrays value = value.split ',' config[key] = value callback null, config (config, callback) -> # create environment ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
a3ce2fed749a3e075ca7233fe93f4be3f167a7f1
3,484
https://github.com/jnordberg/wintersmith/blob/a3ce2fed749a3e075ca7233fe93f4be3f167a7f1/src/cli/common.coffee
40
89
jnordberg/wintersmith:src/cli/common.coffee:1:raw_corpus
raw_corpus
exports.getOptions = (argv, callback) -> ### resolves options with the hierarchy: argv > configfile > defaults returns a options object ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "resolving options - work directory: #{ workDir }" resolveModule = (moduleName, callback) -> ...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
372903cad9bbd185d7a5fbc60a9cd08a5fb1547c
3,484
https://github.com/jnordberg/wintersmith/blob/372903cad9bbd185d7a5fbc60a9cd08a5fb1547c/src/cli/common.coffee
45
94
jnordberg/wintersmith:src/cli/common.coffee:1:completion
completion
exports.getOptions = (argv, callback) -> ### resolves options with the hierarchy: argv > configfile > defaults returns a options object ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "resolving options - work directory: #{ workDir }" resolveModule = (moduleName, callback) -> ...
logger.verbose 'options:', options for key of defaults # assing defaults to missing conf options options[key] ?= defaults[key].default # ovveride conf and default options with any command line options if argv[key]? and argv[key] != defaults[key].default options[key] = arg...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
372903cad9bbd185d7a5fbc60a9cd08a5fb1547c
3,484
https://github.com/jnordberg/wintersmith/blob/372903cad9bbd185d7a5fbc60a9cd08a5fb1547c/src/cli/common.coffee
45
94
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
372903cad9bbd185d7a5fbc60a9cd08a5fb1547c
3,484
https://github.com/jnordberg/wintersmith/blob/372903cad9bbd185d7a5fbc60a9cd08a5fb1547c/src/cli/common.coffee
95
144
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
, (error) -> callback error, options (options, callback) -> if typeof options.plugins is 'string' options.plugins = options.plugins.split ',' # resolve plugin paths if required as file async.map options.plugins, resolveModule, (error, result) -> options.plugins = result ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
372903cad9bbd185d7a5fbc60a9cd08a5fb1547c
3,484
https://github.com/jnordberg/wintersmith/blob/372903cad9bbd185d7a5fbc60a9cd08a5fb1547c/src/cli/common.coffee
95
144
jnordberg/wintersmith:src/cli/common.coffee:3:raw_corpus
raw_corpus
else callback new Error "#{ filepath } path invalid (#{ options[filepath] })" , (error) -> callback error, options ], callback
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
372903cad9bbd185d7a5fbc60a9cd08a5fb1547c
3,484
https://github.com/jnordberg/wintersmith/blob/372903cad9bbd185d7a5fbc60a9cd08a5fb1547c/src/cli/common.coffee
145
149
jnordberg/wintersmith:src/cli/common.coffee:3:completion
completion
else callback new Error "#{ filepath } path invalid (#{ options[filepath] })"
, (error) -> callback error, options ], callback
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
372903cad9bbd185d7a5fbc60a9cd08a5fb1547c
3,484
https://github.com/jnordberg/wintersmith/blob/372903cad9bbd185d7a5fbc60a9cd08a5fb1547c/src/cli/common.coffee
145
149
jnordberg/wintersmith:src/cli/common.coffee:1:raw_corpus
raw_corpus
exports.getOptions = (argv, callback) -> ### resolves options with the hierarchy: argv > configfile > defaults returns a options object ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "resolving options - work directory: #{ workDir }" resolveModule = (moduleName, callback) -> ...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
0edc0a15f19af4f90acc42a8f27ed1d0ec061817
3,484
https://github.com/jnordberg/wintersmith/blob/0edc0a15f19af4f90acc42a8f27ed1d0ec061817/src/cli/common.coffee
42
91
jnordberg/wintersmith:src/cli/common.coffee:1:completion
completion
exports.getOptions = (argv, callback) -> ### resolves options with the hierarchy: argv > configfile > defaults returns a options object ### workDir = path.resolve (argv.chdir or process.cwd()) logger.verbose "resolving options - work directory: #{ workDir }" resolveModule = (moduleName, callback) -> ...
logger.verbose 'options:', options for key of defaults # assing defaults to missing conf options options[key] ?= defaults[key].default # ovveride conf and default options with any command line options if argv[key]? and argv[key] != defaults[key].default options[key] = arg...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
0edc0a15f19af4f90acc42a8f27ed1d0ec061817
3,484
https://github.com/jnordberg/wintersmith/blob/0edc0a15f19af4f90acc42a8f27ed1d0ec061817/src/cli/common.coffee
42
91
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
0edc0a15f19af4f90acc42a8f27ed1d0ec061817
3,484
https://github.com/jnordberg/wintersmith/blob/0edc0a15f19af4f90acc42a8f27ed1d0ec061817/src/cli/common.coffee
92
141
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
, (error) -> callback error, options (options, callback) -> if typeof options.plugins is 'string' options.plugins = options.plugins.split ',' # resolve plugin paths if required as file async.map options.plugins, resolveModule, (error, result) -> options.plugins = result ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
0edc0a15f19af4f90acc42a8f27ed1d0ec061817
3,484
https://github.com/jnordberg/wintersmith/blob/0edc0a15f19af4f90acc42a8f27ed1d0ec061817/src/cli/common.coffee
92
141
jnordberg/wintersmith:src/cli/common.coffee:4:raw_corpus
raw_corpus
exports.loadPlugins = (plugins, callback) -> require 'coffee-script' # so that we can load .coffee files as plugins directly wintersmith = require './../' async.forEach plugins, (plugin, callback) -> logger.verbose "loading plugin: #{ plugin }" try module = require plugin catch error retur...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
476665eede9b63a11d935e8bcd4029dcb24ae6f4
3,484
https://github.com/jnordberg/wintersmith/blob/476665eede9b63a11d935e8bcd4029dcb24ae6f4/src/cli/common.coffee
148
158
jnordberg/wintersmith:src/cli/common.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.loadPlugins = (plugins, callback) -> require 'coffee-script' # so that we can load .coffee files as plugins directly wintersmith = require './../' async.forEach plugins, (plugin, callback) -> logger.verbose "loading plugin: #{ plugin }" try ...
exports.loadPlugins = function(plugins, callback) { var wintersmith; require('coffee-script'); // so that we can load .coffee files as plugins directly wintersmith = require('./../'); return async.forEach(plugins, function(plugin, callback) { var error, module; logger.verbose(`loading plugin: ${plugin}`...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
476665eede9b63a11d935e8bcd4029dcb24ae6f4
3,484
https://github.com/jnordberg/wintersmith/blob/476665eede9b63a11d935e8bcd4029dcb24ae6f4/src/cli/common.coffee
148
158
jnordberg/wintersmith:src/cli/common.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.loadPlugins = function(plugins, callback) { var wintersmith; require('coffee-script'); // so that we can load .coffee files as plugins directly wintersmith = require('./../'); return async.forEach(plugins, function(plugin, callback) { var error,...
exports.loadPlugins = (plugins, callback) -> require 'coffee-script' # so that we can load .coffee files as plugins directly wintersmith = require './../' async.forEach plugins, (plugin, callback) -> logger.verbose "loading plugin: #{ plugin }" try module = require plugin catch error retur...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
476665eede9b63a11d935e8bcd4029dcb24ae6f4
3,484
https://github.com/jnordberg/wintersmith/blob/476665eede9b63a11d935e8bcd4029dcb24ae6f4/src/cli/common.coffee
148
158
jnordberg/wintersmith:src/cli/common.coffee:4:completion
completion
exports.loadPlugins = (plugins, callback) -> require 'coffee-script' # so that we can load .coffee files as plugins directly wintersmith = require './../' async.forEach plugins, (plugin, callback) -> logger.verbose "loading plugin: #{ plugin }"
try module = require plugin catch error return callback error module wintersmith, callback , callback
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
476665eede9b63a11d935e8bcd4029dcb24ae6f4
3,484
https://github.com/jnordberg/wintersmith/blob/476665eede9b63a11d935e8bcd4029dcb24ae6f4/src/cli/common.coffee
148
158
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
f112480201bdc2b35593114d135af2a9de817570
3,484
https://github.com/jnordberg/wintersmith/blob/f112480201bdc2b35593114d135af2a9de817570/src/cli/common.coffee
88
135
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
callback error , (error) -> callback error, options (options, callback) -> if typeof options.plugins is 'string' options.plugins = options.plugins.split ',' # resolve plugin paths if required as file async.map options.plugins, resolveModule, (error, result) -> option...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
f112480201bdc2b35593114d135af2a9de817570
3,484
https://github.com/jnordberg/wintersmith/blob/f112480201bdc2b35593114d135af2a9de817570/src/cli/common.coffee
88
135
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
3b6f2c2c1687c14220c66680f528e56f5b9bdacd
3,484
https://github.com/jnordberg/wintersmith/blob/3b6f2c2c1687c14220c66680f528e56f5b9bdacd/src/cli/common.coffee
88
136
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
catch error callback error , (error) -> callback error, options (options, callback) -> if typeof options.plugins is 'string' options.plugins = options.plugins.split ',' # resolve plugin paths if required as file async.map options.plugins, resolveModule, (error, res...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
3b6f2c2c1687c14220c66680f528e56f5b9bdacd
3,484
https://github.com/jnordberg/wintersmith/blob/3b6f2c2c1687c14220c66680f528e56f5b9bdacd/src/cli/common.coffee
88
136
jnordberg/wintersmith:src/cli/common.coffee:2:raw_corpus
raw_corpus
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
9b47cd4d3f2c3ec0f1c3e8e0d53946728adfd157
3,484
https://github.com/jnordberg/wintersmith/blob/9b47cd4d3f2c3ec0f1c3e8e0d53946728adfd157/src/cli/common.coffee
88
134
jnordberg/wintersmith:src/cli/common.coffee:2:completion
completion
callback error else options.locals = result callback null, options else callback null, options # provide modules specefied with the require option to the template context (options, callback) -> if typeof options.require is 'string' options.require =...
callback error , (error) -> callback error, options (options, callback) -> if typeof options.plugins is 'string' options.plugins = options.plugins.split ',' # resolve plugin paths if required as file async.map options.plugins, resolveModule, (error, result) -> option...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/cli/common.coffee
MIT
9b47cd4d3f2c3ec0f1c3e8e0d53946728adfd157
3,484
https://github.com/jnordberg/wintersmith/blob/9b47cd4d3f2c3ec0f1c3e8e0d53946728adfd157/src/cli/common.coffee
88
134