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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
meltingice/psd.js:lib/psd/path_record.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PathRecord, _;
_ = require('lodash');
// A path record describes a single point in a vector path. This is used
// in a couple of different places, but most notably in vector shapes.
module.exports = PathRecord = class PathRecord {
constructor(file) {
th... | _ = require 'lodash'
# A path record describes a single point in a vector path. This is used
# in a couple of different places, but most notably in vector shapes.
module.exports = class PathRecord
constructor: (@file) ->
@recordType = null
parse: ->
@recordType = @file.readShort()
switch @recordType
... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/path_record.coffee | 1 | 50 |
meltingice/psd.js:lib/psd/path_record.coffee:1:completion | completion | _ = require 'lodash'
# A path record describes a single point in a vector path. This is used
# in a couple of different places, but most notably in vector shapes.
module.exports = class PathRecord
constructor: (@file) ->
@recordType = null
parse: ->
@recordType = @file.readShort()
switch @recordType
... | vert: @precedingVert
horiz: @precedingHoriz
anchor:
vert: @anchorVert
horiz: @anchorHoriz
leaving:
vert: @leavingVert
horiz: @leavingHoriz
when 7
clipboard:
top: @clipboardTop
left: @clipboardLeft
bottom: @clip... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/path_record.coffee | 1 | 50 |
meltingice/psd.js:lib/psd/path_record.coffee:2:raw_corpus | raw_corpus | @linked = @recordType in [1, 4]
@precedingVert = @file.readPathNumber()
@precedingHoriz = @file.readPathNumber()
@anchorVert = @file.readPathNumber()
@anchorHoriz = @file.readPathNumber()
@leavingVert = @file.readPathNumber()
@leavingHoriz = @file.readPathNumber()
_readClipboardRecord: ->
... | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/path_record.coffee | 51 | 72 | ||
meltingice/psd.js:lib/psd/path_record.coffee:2:completion | completion | @linked = @recordType in [1, 4]
@precedingVert = @file.readPathNumber()
@precedingHoriz = @file.readPathNumber()
@anchorVert = @file.readPathNumber()
@anchorHoriz = @file.readPathNumber()
@leavingVert = @file.readPathNumber()
@leavingHoriz = @file.readPathNumber() | _readClipboardRecord: ->
@clipboardTop = @file.readPathNumber()
@clipboardLeft = @file.readPathNumber()
@clipboardBottom = @file.readPathNumber()
@clipboardRight = @file.readPathNumber()
@clipboardResolution = @file.readPathNumber()
@file.seek 4, true
_readInitialFill: ->
@initialFill = @... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/path_record.coffee | 51 | 72 |
meltingice/psd.js:lib/psd/path_record.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = class PathRecord
constructor: (@file) ->
@recordType = null
parse: ->
@recordType = @file.readShort()
switch @recordType
when 0, 3 then @_readPathRecord()
when 1, 2, 4, 5 then @_readBezierPoint()
when 7 then @_readClipboardRecord()
when 8 ... | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | c3e53bea91d69045c5c0eb31e605cfc15ecf5f92 | 2,846 | https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/path_record.coffee | 1 | 50 | ||
meltingice/psd.js:lib/psd/path_record.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = class PathRecord
constructor: (@file) ->
@recordType = null
parse: ->
@recordType = @file.readShort()
switch @recordType
when 0, 3 then @_readPathRecord()
when 1, 2, 4, 5 then @_readBezierPoint(... | var PathRecord, _;
_ = require('lodash');
module.exports = PathRecord = class PathRecord {
constructor(file) {
this.file = file;
this.recordType = null;
}
parse() {
this.recordType = this.file.readShort();
switch (this.recordType) {
case 0:
case 3:
return this._readPathRecor... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | c3e53bea91d69045c5c0eb31e605cfc15ecf5f92 | 2,846 | https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/path_record.coffee | 1 | 50 |
meltingice/psd.js:lib/psd/path_record.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var PathRecord, _;
_ = require('lodash');
module.exports = PathRecord = class PathRecord {
constructor(file) {
this.file = file;
this.recordType = null;
}
parse() {
this.recordType = this.file.readShort();
switch (this.recordType) {
c... | _ = require 'lodash'
module.exports = class PathRecord
constructor: (@file) ->
@recordType = null
parse: ->
@recordType = @file.readShort()
switch @recordType
when 0, 3 then @_readPathRecord()
when 1, 2, 4, 5 then @_readBezierPoint()
when 7 then @_readClipboardRecord()
when 8 ... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | c3e53bea91d69045c5c0eb31e605cfc15ecf5f92 | 2,846 | https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/path_record.coffee | 1 | 50 |
meltingice/psd.js:lib/psd/path_record.coffee:1:completion | completion | _ = require 'lodash'
module.exports = class PathRecord
constructor: (@file) ->
@recordType = null
parse: ->
@recordType = @file.readShort()
switch @recordType
when 0, 3 then @_readPathRecord()
when 1, 2, 4, 5 then @_readBezierPoint()
when 7 then @_readClipboardRecord()
when 8 ... | horiz: @precedingHoriz
anchor:
vert: @anchorVert
horiz: @anchorHoriz
leaving:
vert: @leavingVert
horiz: @leavingHoriz
when 7
clipboard:
top: @clipboardTop
left: @clipboardLeft
bottom: @clipboardBottom
right: @c... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | c3e53bea91d69045c5c0eb31e605cfc15ecf5f92 | 2,846 | https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/path_record.coffee | 1 | 50 |
meltingice/psd.js:lib/psd/path_record.coffee:2:raw_corpus | raw_corpus | @precedingVert = @file.readPathNumber()
@precedingHoriz = @file.readPathNumber()
@anchorVert = @file.readPathNumber()
@anchorHoriz = @file.readPathNumber()
@leavingVert = @file.readPathNumber()
@leavingHoriz = @file.readPathNumber()
_readClipboardRecord: ->
@clipboardTop = @file.readPathNum... | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | c3e53bea91d69045c5c0eb31e605cfc15ecf5f92 | 2,846 | https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/path_record.coffee | 51 | 70 | ||
meltingice/psd.js:lib/psd/path_record.coffee:2:completion | completion | @precedingVert = @file.readPathNumber()
@precedingHoriz = @file.readPathNumber()
@anchorVert = @file.readPathNumber()
@anchorHoriz = @file.readPathNumber()
@leavingVert = @file.readPathNumber()
@leavingHoriz = @file.readPathNumber()
_readClipboardRecord: -> | @clipboardTop = @file.readPathNumber()
@clipboardLeft = @file.readPathNumber()
@clipboardBottom = @file.readPathNumber()
@clipboardRight = @file.readPathNumber()
@clipboardResolution = @file.readPathNumber()
@file.seek 4, true
_readInitialFill: ->
@initialFill = @file.readShort()
@file.se... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/path_record.coffee | MIT | c3e53bea91d69045c5c0eb31e605cfc15ecf5f92 | 2,846 | https://github.com/meltingice/psd.js/blob/c3e53bea91d69045c5c0eb31e605cfc15ecf5f92/lib/psd/path_record.coffee | 51 | 70 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/* ===========================================================\n" +
"# <%= pkg.name %> - v<%= pkg.version %>\n" +
"# <%= pkg.homepa... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/* ===========================================================\n" +
"# <%= pkg.nam... | module.exports = function(grunt) {
// project configuration
return grunt.initConfig({
// load package information
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: "/* ===========================================================\n" + "# <%= pkg.name %> - v<%= pkg.version %>\n" + "# <%= pkg.... | CoffeeScript | JavaScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// project configuration
return grunt.initConfig({
// load package information
pkg: grunt.file.readJSON('package.json'),
meta: {
banner: "/* ===========================================================\n" + "#... | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/* ===========================================================\n" +
"# <%= pkg.name %> - v<%= pkg.version %>\n" +
"# <%= pkg.homepa... | JavaScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:completion | completion | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
meta:
banner: "/* ===========================================================\n" +
"# <%= pkg.name %> - v<%= pkg.version %>\n" +
"# <%= pkg.homepa... | coffeelint:
options:
indentation:
value: 2
level: "error"
no_trailing_semicolons:
level: "error"
no_trailing_whitespace:
level: "error"
max_line_length:
level: "ignore"
default: ["Gruntfile.coffee", "src/**/*.coffee"]
te... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | dest: "build/js/bootstrap-tour.js"
coffee:
options:
banner: "<%= meta.banner %>"
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tour.js"
test:
src: "test/spec/bootstrap-tour.spec.coffee"
dest: "test/build/bootstrap-tour.spec.js"
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 51 | 100 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | dest: "build/js/bootstrap-tour.js"
coffee:
options:
banner: "<%= meta.banner %>"
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tour.js"
test:
src: "test/spec/bootstrap-tour.spec.coffee"
dest: "test/build/bootstrap-tour.spec.js"
... | src: "docs/index.less"
dest: "docs/assets/css/index.css"
uglify:
options:
banner: "<%= meta.banner %>"
default:
src: "build/js/bootstrap-tour.js"
dest: "build/js/bootstrap-tour.min.js"
# watching for changes
watch:
default:
files: ["src/coffee/*.co... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 51 | 100 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | livereload: true
jasmine:
# keep an eye on the order of deps import
src: [
"docs/assets/vendor/jquery.js"
"docs/assets/vendor/bootstrap.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
fi... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 101 | 150 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | livereload: true
jasmine:
# keep an eye on the order of deps import
src: [
"docs/assets/vendor/jquery.js"
"docs/assets/vendor/bootstrap.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
fi... | connect:
default:
options:
port: 3000
base: "docs"
open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
g... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 63a6e3f12b55f16d468a1401023e342ebe8df55d | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/63a6e3f12b55f16d468a1401023e342ebe8df55d/Gruntfile.coffee | 101 | 150 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | dest: "build/js/bootstrap-tour.js"
coffee:
options:
banner: "<%= meta.banner %>"
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tour.js"
test:
src: "test/spec/bootstrap-tour.spec.coffee"
dest: "test/build/bootstrap-tour.spec.js"
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | b25c8921d4f8ce21d47de539137de44bcd86d911 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b25c8921d4f8ce21d47de539137de44bcd86d911/Gruntfile.coffee | 51 | 100 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | dest: "build/js/bootstrap-tour.js"
coffee:
options:
banner: "<%= meta.banner %>"
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tour.js"
test:
src: "test/spec/bootstrap-tour.spec.coffee"
dest: "test/build/bootstrap-tour.spec.js"
... | uglify:
options:
banner: "<%= meta.banner %>"
default:
src: "build/js/bootstrap-tour.js"
dest: "build/js/bootstrap-tour.min.js"
# watching for changes
watch:
default:
files: ["src/coffee/*.coffee"]
tasks: ["clean:default", "coffeelint:default", "coffee:... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | b25c8921d4f8ce21d47de539137de44bcd86d911 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b25c8921d4f8ce21d47de539137de44bcd86d911/Gruntfile.coffee | 51 | 100 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | "docs/assets/vendor/bootstrap.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
cwd: "build/js",
dest: "docs/assets/js",
src: ["*.js"]
,
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | b25c8921d4f8ce21d47de539137de44bcd86d911 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b25c8921d4f8ce21d47de539137de44bcd86d911/Gruntfile.coffee | 101 | 150 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | "docs/assets/vendor/bootstrap.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
cwd: "build/js",
dest: "docs/assets/js",
src: ["*.js"]
,
... | open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeelint"
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.lo... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | b25c8921d4f8ce21d47de539137de44bcd86d911 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b25c8921d4f8ce21d47de539137de44bcd86d911/Gruntfile.coffee | 101 | 150 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | "docs/assets/vendor/bootstrap/alert.js"
"docs/assets/vendor/bootstrap/tooltip.js"
"docs/assets/vendor/bootstrap/popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 907b7e452bea76f9e86635517dcf09c225b35736 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/907b7e452bea76f9e86635517dcf09c225b35736/Gruntfile.coffee | 101 | 150 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | "docs/assets/vendor/bootstrap/alert.js"
"docs/assets/vendor/bootstrap/tooltip.js"
"docs/assets/vendor/bootstrap/popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | port: 3000
base: "docs"
open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeelint"
grunt.loadNp... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 907b7e452bea76f9e86635517dcf09c225b35736 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/907b7e452bea76f9e86635517dcf09c225b35736/Gruntfile.coffee | 101 | 150 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | "docs/assets/vendor/bootstrap/alert.js"
"docs/assets/vendor/bootstrap/tooltip.js"
"docs/assets/vendor/bootstrap/popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | cfa8a36151a6d0312cf5b3d096aad8acf6171424 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/cfa8a36151a6d0312cf5b3d096aad8acf6171424/Gruntfile.coffee | 101 | 150 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | "docs/assets/vendor/bootstrap/alert.js"
"docs/assets/vendor/bootstrap/tooltip.js"
"docs/assets/vendor/bootstrap/popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | port: 3000
base: "docs"
open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeelint"
grunt.loadNp... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | cfa8a36151a6d0312cf5b3d096aad8acf6171424 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/cfa8a36151a6d0312cf5b3d096aad8acf6171424/Gruntfile.coffee | 101 | 150 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | "docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 4c3b6a99751ba37dcac2986f8deda0b8be15e7f4 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/4c3b6a99751ba37dcac2986f8deda0b8be15e7f4/Gruntfile.coffee | 101 | 150 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | "docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | port: 3000
base: "docs"
open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeelint"
grunt.loadNp... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 4c3b6a99751ba37dcac2986f8deda0b8be15e7f4 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/4c3b6a99751ba37dcac2986f8deda0b8be15e7f4/Gruntfile.coffee | 101 | 150 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | "docs/assets/vendor/jquery.cookie.js"
"docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
defaul... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | d97b9f47dd59bf13ea857ab1c6c66e803df7b451 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/d97b9f47dd59bf13ea857ab1c6c66e803df7b451/Gruntfile.coffee | 101 | 150 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | "docs/assets/vendor/jquery.cookie.js"
"docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
defaul... | options:
port: 3000
base: "docs"
open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeel... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | d97b9f47dd59bf13ea857ab1c6c66e803df7b451 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/d97b9f47dd59bf13ea857ab1c6c66e803df7b451/Gruntfile.coffee | 101 | 150 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
coffeelint:
options:
indentation:
value: 2
level: "error"
no_trailing_semicolons:
level: "error"
no_trailing... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
coffeelint:
options:
indentation:
value: 2
level: "error"
no_trailing... | module.exports = function(grunt) {
// project configuration
return grunt.initConfig({
// load package information
pkg: grunt.file.readJSON('package.json'),
coffeelint: {
options: {
indentation: {
value: 2,
level: "error"
},
no_trailing_semicolons: {
... | CoffeeScript | JavaScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// project configuration
return grunt.initConfig({
// load package information
pkg: grunt.file.readJSON('package.json'),
coffeelint: {
options: {
indentation: {
value: 2,
level: "e... | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
coffeelint:
options:
indentation:
value: 2
level: "error"
no_trailing_semicolons:
level: "error"
no_trailing... | JavaScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:completion | completion | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
coffeelint:
options:
indentation:
value: 2
level: "error"
no_trailing_semicolons:
level: "error"
no_trailing... | coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tour.js"
test:
src: "test/spec/bootstrap-tour.spec.coffee"
dest: "test/build/bootstrap-tour.spec.js"
doc:
src: "docs/index.coffee"
dest: "docs/assets/js/index.js"
les... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | # watching for changes
watch:
default:
files: ["src/coffee/*.coffee"]
tasks: ["clean:default", "coffeelint:default", "coffee:default", "uglify"]
test:
files: ["test/spec/*.coffee"]
tasks: ["clean:test", "coffeelint:test", "coffee:test", "jasmine"]
doc:
files... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 51 | 100 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | # watching for changes
watch:
default:
files: ["src/coffee/*.coffee"]
tasks: ["clean:default", "coffeelint:default", "coffee:default", "uglify"]
test:
files: ["test/spec/*.coffee"]
tasks: ["clean:test", "coffeelint:test", "coffee:test", "jasmine"]
doc:
files... | options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
cwd: "build/js",
dest: "docs/assets/js",
src: ["*.js"]
,
expand: true,
cwd: "build/css",
dest: "docs/assets/c... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 51 | 100 |
sorich87/bootstrap-tour:Gruntfile.coffee:3:raw_corpus | raw_corpus | path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeelint"
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-cof... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 101 | 122 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:3:completion | completion | path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-coffeelint"
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-cof... | grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-jasmine"
grunt.loadNpmTasks "grunt-contrib-copy"
grunt.loadNpmTasks "grunt-contrib-connect"
grunt.loadNpmTasks "grunt-open"
# register tasks
grunt.registerTask "run", ["connect", "open", "watch:doc"]
grunt.registerTask "build", ["... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 7ead02eece7ce52866c59490c06cbd6d591e31f5 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/7ead02eece7ce52866c59490c06cbd6d591e31f5/Gruntfile.coffee | 101 | 122 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/boo... | module.exports = function(grunt) {
// project configuration
return grunt.initConfig({
// load package information
pkg: grunt.file.readJSON('package.json'),
clean: {
default: "build",
test: "test/build"
},
coffee: {
default: {
src: "src/coffee/bootstrap-tour.coffee",
... | CoffeeScript | JavaScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// project configuration
return grunt.initConfig({
// load package information
pkg: grunt.file.readJSON('package.json'),
clean: {
default: "build",
test: "test/build"
},
coffee: {
default:... | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | JavaScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:completion | completion | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | dest: "build/css/bootstrap-tour.css"
min:
src: "src/less/bootstrap-tour.less"
dest: "build/css/bootstrap-tour.min.css"
options:
yuicompress: true
uglify:
default:
src: "build/js/bootstrap-tour.js"
dest: "build/js/bootstrap-tour.min.js"
# watching f... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | jasmine:
# keep an eye on the order of deps import
src: [
"docs/assets/vendor/jquery.js"
"docs/assets/vendor/jquery.cookie.js"
"docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 51 | 100 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
jasmine:
# keep an eye on the order of deps import
src: [
"docs/assets/vendor/jquery.js"
"docs/assets/vendor/jquery.cookie.js"
"docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"d... | ({
jasmine: {
// keep an eye on the order of deps import
src: ["docs/assets/vendor/jquery.js", "docs/assets/vendor/jquery.cookie.js", "docs/assets/vendor/bootstrap-alert.js", "docs/assets/vendor/bootstrap-tooltip.js", "docs/assets/vendor/bootstrap-popover.js", "build/js/bootstrap-tour.js"],
options: {
... | CoffeeScript | JavaScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 51 | 100 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
jasmine: {
// keep an eye on the order of deps import
src: ["docs/assets/vendor/jquery.js", "docs/assets/vendor/jquery.cookie.js", "docs/assets/vendor/bootstrap-alert.js", "docs/assets/vendor/bootstrap-tooltip.js", "docs/assets/vendor/bootstrap-popover... | jasmine:
# keep an eye on the order of deps import
src: [
"docs/assets/vendor/jquery.js"
"docs/assets/vendor/jquery.cookie.js"
"docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js... | JavaScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 51 | 100 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | jasmine:
# keep an eye on the order of deps import
src: [
"docs/assets/vendor/jquery.js"
"docs/assets/vendor/jquery.cookie.js"
"docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js... | ]
connect:
default:
options:
port: 3000
base: "docs"
open:
default:
path: "http://localhost:<%= connect.default.options.port %>"
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the con... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 34a1da267a6dcb2476e0de8001f78e8e2798da04 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/34a1da267a6dcb2476e0de8001f78e8e2798da04/Gruntfile.coffee | 51 | 100 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 9891691ac010967cdc856a5208b1e1bc1d5db5ae | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/9891691ac010967cdc856a5208b1e1bc1d5db5ae/Gruntfile.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:1:completion | completion | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | min:
src: "src/less/bootstrap-tour.less"
dest: "build/css/bootstrap-tour.min.css"
options:
yuicompress: true
uglify:
default:
src: "build/js/bootstrap-tour.js"
dest: "build/js/bootstrap-tour.min.js"
# watching for changes
watch:
default:
... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 9891691ac010967cdc856a5208b1e1bc1d5db5ae | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/9891691ac010967cdc856a5208b1e1bc1d5db5ae/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | "docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 9891691ac010967cdc856a5208b1e1bc1d5db5ae | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/9891691ac010967cdc856a5208b1e1bc1d5db5ae/Gruntfile.coffee | 51 | 88 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | "docs/assets/vendor/bootstrap-alert.js"
"docs/assets/vendor/bootstrap-tooltip.js"
"docs/assets/vendor/bootstrap-popover.js"
"build/js/bootstrap-tour.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
copy:
default:
files: [
expand: true,
... | src: ["*.css"]
]
# TODO:
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-less"
grunt.loadNpmTasks "grunt-c... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 9891691ac010967cdc856a5208b1e1bc1d5db5ae | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/9891691ac010967cdc856a5208b1e1bc1d5db5ae/Gruntfile.coffee | 51 | 88 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 745e7916ada8abd7526f8083c535b038da759584 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/745e7916ada8abd7526f8083c535b038da759584/Gruntfile.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:1:completion | completion | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | options:
yuicompress: true
uglify:
src: "build/js/bootstrap-tour.js"
dest: "build/js/bootstrap-tour.min.js"
# watching for changes
watch:
default:
files: ["src/coffee/*.coffee"]
tasks: ["clean:default", "coffee:default", "uglify"]
test:
files: ["te... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 745e7916ada8abd7526f8083c535b038da759584 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/745e7916ada8abd7526f8083c535b038da759584/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | ]
options:
specs: "test/build/bootstrap-tour.spec.js"
# TODO:
# - jasmine html runner
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-coffee"
... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 745e7916ada8abd7526f8083c535b038da759584 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/745e7916ada8abd7526f8083c535b038da759584/Gruntfile.coffee | 51 | 70 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | ]
options:
specs: "test/build/bootstrap-tour.spec.js"
# TODO:
# - jasmine html runner
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the config
grunt.loadNpmTasks "grunt-contrib-clean" | grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-less"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-jasmine"
# register tasks
grunt.registerTask "build", ["clean:default", "coffee:default", "less", "uglify"]
... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | 745e7916ada8abd7526f8083c535b038da759584 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/745e7916ada8abd7526f8083c535b038da759584/Gruntfile.coffee | 51 | 70 |
sorich87/bootstrap-tour:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | aeccad58df7b10db53a56c41246cefad6dfe8a11 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/aeccad58df7b10db53a56c41246cefad6dfe8a11/Gruntfile.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:1:completion | completion | module.exports = (grunt)->
# project configuration
grunt.initConfig
# load package information
pkg: grunt.file.readJSON 'package.json'
clean:
default: "build"
test: "test/build"
coffee:
default:
src: "src/coffee/bootstrap-tour.coffee"
dest: "build/js/bootstrap-tou... | options:
yuicompress: true
uglify:
default:
src: "build/js/bootstrap-tour.js"
dest: "build/js/bootstrap-tour.min.js"
# watching for changes
watch:
default:
files: ["src/coffee/*.coffee"]
tasks: ["clean:default", "coffee:default", "uglify"]
test:
... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | aeccad58df7b10db53a56c41246cefad6dfe8a11 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/aeccad58df7b10db53a56c41246cefad6dfe8a11/Gruntfile.coffee | 1 | 50 |
sorich87/bootstrap-tour:Gruntfile.coffee:2:raw_corpus | raw_corpus | "build/js/*.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
# TODO:
# - download bootstrap.js / bootstrap.css from cdn if not present
# - jasmine html runner
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the co... | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | aeccad58df7b10db53a56c41246cefad6dfe8a11 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/aeccad58df7b10db53a56c41246cefad6dfe8a11/Gruntfile.coffee | 51 | 72 | ||
sorich87/bootstrap-tour:Gruntfile.coffee:2:completion | completion | "build/js/*.js"
]
options:
specs: "test/build/bootstrap-tour.spec.js"
# TODO:
# - download bootstrap.js / bootstrap.css from cdn if not present
# - jasmine html runner
# - browser sample page reloads on watch when developing
# load plugins that provide the tasks defined in the co... | grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-less"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-jasmine"
# register tasks
grunt.registerTask "build", ["clean:def... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | Gruntfile.coffee | MIT | aeccad58df7b10db53a56c41246cefad6dfe8a11 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/aeccad58df7b10db53a56c41246cefad6dfe8a11/Gruntfile.coffee | 51 | 72 |
gss/engine:src/commands/Call.coffee:1:raw_corpus | raw_corpus | Command = require('../Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable']
]
class Call.Unsafe extends Call
signature: false
module.exports = Call | CoffeeScript | gss/engine | src/commands/Call.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Call.coffee | 1 | 14 | ||
gss/engine:src/commands/Call.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Command = require('../Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable']
]
class Call.Unsafe extends Call
signature: false
module.exports = Call
``` | var Call, Command;
Command = require('../Command');
Call = (function() {
class Call extends Command {};
Call.prototype.type = 'Call';
Call.prototype.signature = [
{
value: ['Variable']
}
];
return Call;
}).call(this);
Call.Unsafe = (function() {
class Unsafe extends Call {};
Unsafe.p... | CoffeeScript | JavaScript | gss/engine | src/commands/Call.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Call.coffee | 1 | 14 |
gss/engine:src/commands/Call.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Call, Command;
Command = require('../Command');
Call = (function() {
class Call extends Command {};
Call.prototype.type = 'Call';
Call.prototype.signature = [
{
value: ['Variable']
}
];
return Call;
}).call(this);
Call.Unsafe = (f... | Command = require('../Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable']
]
class Call.Unsafe extends Call
signature: false
module.exports = Call | JavaScript | CoffeeScript | gss/engine | src/commands/Call.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Call.coffee | 1 | 14 |
gss/engine:src/commands/Call.coffee:1:completion | completion | Command = require('../Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable'] | ]
class Call.Unsafe extends Call
signature: false
module.exports = Call | CoffeeScript | CoffeeScript | gss/engine | src/commands/Call.coffee | MIT | 31938f86e04f67ada173275db8f0e673655a12e9 | 2,854 | https://github.com/gss/engine/blob/31938f86e04f67ada173275db8f0e673655a12e9/src/commands/Call.coffee | 1 | 14 |
gss/engine:src/commands/Call.coffee:1:raw_corpus | raw_corpus | Command = require('../concepts/Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable']
]
class Call.Unsafe extends Call
signature: false
module.exports = Call | CoffeeScript | gss/engine | src/commands/Call.coffee | MIT | 527308fd09ab6b18a30ad7b6194f0fd00f872647 | 2,854 | https://github.com/gss/engine/blob/527308fd09ab6b18a30ad7b6194f0fd00f872647/src/commands/Call.coffee | 1 | 14 | ||
gss/engine:src/commands/Call.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Command = require('../concepts/Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable']
]
class Call.Unsafe extends Call
signature: false
module.exports = Call
``` | var Call, Command;
Command = require('../concepts/Command');
Call = (function() {
class Call extends Command {};
Call.prototype.type = 'Call';
Call.prototype.signature = [
{
value: ['Variable']
}
];
return Call;
}).call(this);
Call.Unsafe = (function() {
class Unsafe extends Call {};
... | CoffeeScript | JavaScript | gss/engine | src/commands/Call.coffee | MIT | 527308fd09ab6b18a30ad7b6194f0fd00f872647 | 2,854 | https://github.com/gss/engine/blob/527308fd09ab6b18a30ad7b6194f0fd00f872647/src/commands/Call.coffee | 1 | 14 |
gss/engine:src/commands/Call.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Call, Command;
Command = require('../concepts/Command');
Call = (function() {
class Call extends Command {};
Call.prototype.type = 'Call';
Call.prototype.signature = [
{
value: ['Variable']
}
];
return Call;
}).call(this);
Call.Un... | Command = require('../concepts/Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable']
]
class Call.Unsafe extends Call
signature: false
module.exports = Call | JavaScript | CoffeeScript | gss/engine | src/commands/Call.coffee | MIT | 527308fd09ab6b18a30ad7b6194f0fd00f872647 | 2,854 | https://github.com/gss/engine/blob/527308fd09ab6b18a30ad7b6194f0fd00f872647/src/commands/Call.coffee | 1 | 14 |
gss/engine:src/commands/Call.coffee:1:completion | completion | Command = require('../concepts/Command')
class Call extends Command
type: 'Call'
signature: [
value: ['Variable'] | ]
class Call.Unsafe extends Call
signature: false
module.exports = Call | CoffeeScript | CoffeeScript | gss/engine | src/commands/Call.coffee | MIT | 527308fd09ab6b18a30ad7b6194f0fd00f872647 | 2,854 | https://github.com/gss/engine/blob/527308fd09ab6b18a30ad7b6194f0fd00f872647/src/commands/Call.coffee | 1 | 14 |
jianliaoim/talk-os:talk-web/test/pages/index.coffee:1:raw_corpus | raw_corpus | require '../../client/main.less'
React = require 'react'
ReactDOM = require 'react-dom'
Markdown = React.createFactory require './markdown'
MessageRich = React.createFactory require './message-rich'
{div, ul, li, hr} = React.DOM
PAGES = [
{k: 'message rich', v: MessageRich}
{k: 'markdown', v: Markdown}
]
Main ... | CoffeeScript | jianliaoim/talk-os | talk-web/test/pages/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/index.coffee | 1 | 35 | ||
jianliaoim/talk-os:talk-web/test/pages/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
require '../../client/main.less'
React = require 'react'
ReactDOM = require 'react-dom'
Markdown = React.createFactory require './markdown'
MessageRich = React.createFactory require './message-rich'
{div, ul, li, hr} = React.DOM
PAGES = [
{k: 'message rich'... | var Main, Markdown, MessageRich, PAGES, React, ReactDOM, div, hr, li, ul;
require('../../client/main.less');
React = require('react');
ReactDOM = require('react-dom');
Markdown = React.createFactory(require('./markdown'));
MessageRich = React.createFactory(require('./message-rich'));
({div, ul, li, hr} = React.DO... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/test/pages/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/index.coffee | 1 | 35 |
jianliaoim/talk-os:talk-web/test/pages/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Main, Markdown, MessageRich, PAGES, React, ReactDOM, div, hr, li, ul;
require('../../client/main.less');
React = require('react');
ReactDOM = require('react-dom');
Markdown = React.createFactory(require('./markdown'));
MessageRich = React.createFactory(req... | require '../../client/main.less'
React = require 'react'
ReactDOM = require 'react-dom'
Markdown = React.createFactory require './markdown'
MessageRich = React.createFactory require './message-rich'
{div, ul, li, hr} = React.DOM
PAGES = [
{k: 'message rich', v: MessageRich}
{k: 'markdown', v: Markdown}
]
Main ... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/test/pages/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/index.coffee | 1 | 35 |
jianliaoim/talk-os:talk-web/test/pages/index.coffee:1:completion | completion | require '../../client/main.less'
React = require 'react'
ReactDOM = require 'react-dom'
Markdown = React.createFactory require './markdown'
MessageRich = React.createFactory require './message-rich'
{div, ul, li, hr} = React.DOM
PAGES = [
{k: 'message rich', v: MessageRich}
{k: 'markdown', v: Markdown}
]
Main ... | getInitialState: ->
page: PAGES[0].v
onClick: (page) ->
@setState
page: page
render: ->
div className: 'app-container flex-vert',
ul null, PAGES.map (page) =>
li
key: page.k
onClick: (=> @onClick(page.v)),
page.k
hr()
@state.page()
ReactDO... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/test/pages/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/index.coffee | 1 | 35 |
jianliaoim/talk-os:talk-account/server/initializers/locales/en.coffee:1:raw_corpus | raw_corpus | module.exports =
NOT_FOUND: 'Not Found'
OBJECT_MISSING: (msg = '') -> "Object missing #{msg}"
PARAMS_INVALID: (msg = '') -> "Invalid parameter #{msg}"
PARAMS_MISSING: (msg = '') -> "Parameter #{msg} missing"
RATE_LIMIT_EXCEEDED: "Sending request too freqently"
REQUEST_FAILED: 'Request failed'
VERIFY_FAIL... | CoffeeScript | jianliaoim/talk-os | talk-account/server/initializers/locales/en.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/initializers/locales/en.coffee | 1 | 21 | ||
jianliaoim/talk-os:talk-account/server/initializers/locales/en.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
NOT_FOUND: 'Not Found'
OBJECT_MISSING: (msg = '') -> "Object missing #{msg}"
PARAMS_INVALID: (msg = '') -> "Invalid parameter #{msg}"
PARAMS_MISSING: (msg = '') -> "Parameter #{msg} missing"
RATE_LIMIT_EXCEEDED: "Sending request too fre... | module.exports = {
NOT_FOUND: 'Not Found',
OBJECT_MISSING: function(msg = '') {
return `Object missing ${msg}`;
},
PARAMS_INVALID: function(msg = '') {
return `Invalid parameter ${msg}`;
},
PARAMS_MISSING: function(msg = '') {
return `Parameter ${msg} missing`;
},
RATE_LIMIT_EXCEEDED: "Sendi... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/server/initializers/locales/en.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/initializers/locales/en.coffee | 1 | 21 |
jianliaoim/talk-os:talk-account/server/initializers/locales/en.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = {
NOT_FOUND: 'Not Found',
OBJECT_MISSING: function(msg = '') {
return `Object missing ${msg}`;
},
PARAMS_INVALID: function(msg = '') {
return `Invalid parameter ${msg}`;
},
PARAMS_MISSING: function(msg = '') {
return `Parame... | module.exports =
NOT_FOUND: 'Not Found'
OBJECT_MISSING: (msg = '') -> "Object missing #{msg}"
PARAMS_INVALID: (msg = '') -> "Invalid parameter #{msg}"
PARAMS_MISSING: (msg = '') -> "Parameter #{msg} missing"
RATE_LIMIT_EXCEEDED: "Sending request too freqently"
REQUEST_FAILED: 'Request failed'
VERIFY_FAIL... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/server/initializers/locales/en.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/initializers/locales/en.coffee | 1 | 21 |
jianliaoim/talk-os:talk-account/server/initializers/locales/en.coffee:1:completion | completion | module.exports =
NOT_FOUND: 'Not Found'
OBJECT_MISSING: (msg = '') -> "Object missing #{msg}"
PARAMS_INVALID: (msg = '') -> "Invalid parameter #{msg}"
PARAMS_MISSING: (msg = '') -> "Parameter #{msg} missing"
RATE_LIMIT_EXCEEDED: "Sending request too freqently"
REQUEST_FAILED: 'Request failed'
VERIFY_FAIL... | RESEND_TOO_OFTEN: 'Request too frequently'
INVALID_SOURCE: (source) -> "#{source} not yet supported"
LOGIN_FAILED: "Login failed :%s"
BIND_CONFLICT: "Specified binding account already occupied"
PASSWORD_TOO_SIMPLE: "Password is too simple, please change!"
LOGIN_VERIFY_FAILED: 'There was an error with your E-M... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/server/initializers/locales/en.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/initializers/locales/en.coffee | 1 | 21 |
jianliaoim/talk-os:talk-api2x/server/components/striker.coffee:1:raw_corpus | raw_corpus | # @osv
return module.exports =
signAuth: -> 'token'
downloadUrl: -> ''
previewUrl: -> ''
thumbnailUrl: -> ''
StrikerUtil = require 'striker-util'
config = require 'config'
module.exports = strikerUtil = new StrikerUtil
host: config.strikerHost
storage: config.strikerStorage
secretKeys: config.strikerAut... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/components/striker.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/striker.coffee | 1 | 15 | ||
jianliaoim/talk-os:talk-api2x/server/components/striker.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# @osv
return module.exports =
signAuth: -> 'token'
downloadUrl: -> ''
previewUrl: -> ''
thumbnailUrl: -> ''
StrikerUtil = require 'striker-util'
config = require 'config'
module.exports = strikerUtil = new StrikerUtil
host: config.strikerHost
stora... | // @osv
var StrikerUtil, config, strikerUtil;
return module.exports = {
signAuth: function() {
return 'token';
},
downloadUrl: function() {
return '';
},
previewUrl: function() {
return '';
},
thumbnailUrl: function() {
return '';
}
};
StrikerUtil = require('striker-util');
config = r... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/components/striker.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/striker.coffee | 1 | 15 |
jianliaoim/talk-os:talk-api2x/server/components/striker.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// @osv
var StrikerUtil, config, strikerUtil;
return module.exports = {
signAuth: function() {
return 'token';
},
downloadUrl: function() {
return '';
},
previewUrl: function() {
return '';
},
thumbnailUrl: function() {
return '';
}... | # @osv
return module.exports =
signAuth: -> 'token'
downloadUrl: -> ''
previewUrl: -> ''
thumbnailUrl: -> ''
StrikerUtil = require 'striker-util'
config = require 'config'
module.exports = strikerUtil = new StrikerUtil
host: config.strikerHost
storage: config.strikerStorage
secretKeys: config.strikerAut... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/components/striker.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/striker.coffee | 1 | 15 |
jianliaoim/talk-os:talk-api2x/server/components/striker.coffee:1:completion | completion | # @osv
return module.exports =
signAuth: -> 'token'
downloadUrl: -> ''
previewUrl: -> ''
thumbnailUrl: -> '' | StrikerUtil = require 'striker-util'
config = require 'config'
module.exports = strikerUtil = new StrikerUtil
host: config.strikerHost
storage: config.strikerStorage
secretKeys: config.strikerAuth
expiresInSeconds: 3600 * 48 | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/components/striker.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/striker.coffee | 1 | 15 |
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus | raw_corpus | egal = (a, b) ->
if a is b
a isnt 0 or 1/a is 1/b
else
a isnt a and b isnt b
# A recursive functional equivalence helper; uses egal for testing equivalence. | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 2 | 8 | ||
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
egal = (a, b) ->
if a is b
a isnt 0 or 1/a is 1/b
else
a isnt a and b isnt b
# A recursive functional equivalence helper; uses egal for testing equivalence.
``` | var egal;
egal = function(a, b) {
if (a === b) {
return a !== 0 || 1 / a === 1 / b;
} else {
return a !== a && b !== b;
}
};
// A recursive functional equivalence helper; uses egal for testing equivalence. | CoffeeScript | JavaScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 2 | 8 |
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var egal;
egal = function(a, b) {
if (a === b) {
return a !== 0 || 1 / a === 1 / b;
} else {
return a !== a && b !== b;
}
};
// A recursive functional equivalence helper; uses egal for testing equivalence.
``` | egal = (a, b) ->
if a is b
a isnt 0 or 1/a is 1/b
else
a isnt a and b isnt b
# A recursive functional equivalence helper; uses egal for testing equivalence. | JavaScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 2 | 8 |
jashkenas/coffeescript:test/support/helpers.coffee:1:completion | completion | egal = (a, b) ->
if a is b
a isnt 0 or 1/a is 1/b | else
a isnt a and b isnt b
# A recursive functional equivalence helper; uses egal for testing equivalence. | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 2 | 8 |
jashkenas/coffeescript:test/support/helpers.coffee:2:raw_corpus | raw_corpus | arrayEgal = (a, b) ->
if egal a, b then yes
else if a instanceof Array and b instanceof Array
return no unless a.length is b.length
return no for el, idx in a when not arrayEgal el, b[idx]
yes | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 9 | 14 | ||
jashkenas/coffeescript:test/support/helpers.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
arrayEgal = (a, b) ->
if egal a, b then yes
else if a instanceof Array and b instanceof Array
return no unless a.length is b.length
return no for el, idx in a when not arrayEgal el, b[idx]
yes
``` | var arrayEgal;
arrayEgal = function(a, b) {
var el, i, idx, len;
if (egal(a, b)) {
return true;
} else if (a instanceof Array && b instanceof Array) {
if (a.length !== b.length) {
return false;
}
for (idx = i = 0, len = a.length; i < len; idx = ++i) {
el = a[idx];
if (!arrayEgal... | CoffeeScript | JavaScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 9 | 14 |
jashkenas/coffeescript:test/support/helpers.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var arrayEgal;
arrayEgal = function(a, b) {
var el, i, idx, len;
if (egal(a, b)) {
return true;
} else if (a instanceof Array && b instanceof Array) {
if (a.length !== b.length) {
return false;
}
for (idx = i = 0, len = a.length; i < le... | arrayEgal = (a, b) ->
if egal a, b then yes
else if a instanceof Array and b instanceof Array
return no unless a.length is b.length
return no for el, idx in a when not arrayEgal el, b[idx]
yes | JavaScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 9 | 14 |
jashkenas/coffeescript:test/support/helpers.coffee:2:completion | completion | arrayEgal = (a, b) ->
if egal a, b then yes
else if a instanceof Array and b instanceof Array | return no unless a.length is b.length
return no for el, idx in a when not arrayEgal el, b[idx]
yes | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 9 | 14 |
jashkenas/coffeescript:test/support/helpers.coffee:3:raw_corpus | raw_corpus | diffOutput = (expectedOutput, actualOutput) ->
expectedOutputLines = expectedOutput.split '\n'
actualOutputLines = actualOutput.split '\n'
for line, i in actualOutputLines
if line isnt expectedOutputLines[i]
actualOutputLines[i] = "#{yellow}#{line}#{reset}"
"""Expected generated JavaScript to be:
#{... | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 16 | 25 | ||
jashkenas/coffeescript:test/support/helpers.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
diffOutput = (expectedOutput, actualOutput) ->
expectedOutputLines = expectedOutput.split '\n'
actualOutputLines = actualOutput.split '\n'
for line, i in actualOutputLines
if line isnt expectedOutputLines[i]
actualOutputLines[i] = "#{yellow}#{line... | var diffOutput;
diffOutput = function(expectedOutput, actualOutput) {
var actualOutputLines, expectedOutputLines, i, j, len, line;
expectedOutputLines = expectedOutput.split('\n');
actualOutputLines = actualOutput.split('\n');
for (i = j = 0, len = actualOutputLines.length; j < len; i = ++j) {
line = actua... | CoffeeScript | JavaScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 16 | 25 |
jashkenas/coffeescript:test/support/helpers.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var diffOutput;
diffOutput = function(expectedOutput, actualOutput) {
var actualOutputLines, expectedOutputLines, i, j, len, line;
expectedOutputLines = expectedOutput.split('\n');
actualOutputLines = actualOutput.split('\n');
for (i = j = 0, len = actualO... | diffOutput = (expectedOutput, actualOutput) ->
expectedOutputLines = expectedOutput.split '\n'
actualOutputLines = actualOutput.split '\n'
for line, i in actualOutputLines
if line isnt expectedOutputLines[i]
actualOutputLines[i] = "#{yellow}#{line}#{reset}"
"""Expected generated JavaScript to be:
#{... | JavaScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 16 | 25 |
jashkenas/coffeescript:test/support/helpers.coffee:3:completion | completion | diffOutput = (expectedOutput, actualOutput) ->
expectedOutputLines = expectedOutput.split '\n'
actualOutputLines = actualOutput.split '\n'
for line, i in actualOutputLines
if line isnt expectedOutputLines[i] | actualOutputLines[i] = "#{yellow}#{line}#{reset}"
"""Expected generated JavaScript to be:
#{reset}#{expectedOutput}#{red}
but instead it was:
#{reset}#{actualOutputLines.join '\n'}#{red}""" | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 16 | 25 |
jashkenas/coffeescript:test/support/helpers.coffee:4:raw_corpus | raw_corpus | exports.eq = (a, b, msg) ->
ok egal(a, b), msg or
"Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 27 | 29 | ||
jashkenas/coffeescript:test/support/helpers.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.eq = (a, b, msg) ->
ok egal(a, b), msg or
"Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}"
``` | exports.eq = function(a, b, msg) {
return ok(egal(a, b), msg || `Expected ${reset}${a}${red} to equal ${reset}${b}${red}`);
}; | CoffeeScript | JavaScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 27 | 29 |
jashkenas/coffeescript:test/support/helpers.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.eq = function(a, b, msg) {
return ok(egal(a, b), msg || `Expected ${reset}${a}${red} to equal ${reset}${b}${red}`);
};
``` | exports.eq = (a, b, msg) ->
ok egal(a, b), msg or
"Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" | JavaScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 27 | 29 |
jashkenas/coffeescript:test/support/helpers.coffee:5:raw_corpus | raw_corpus | exports.arrayEq = (a, b, msg) ->
ok arrayEgal(a, b), msg or
"Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}" | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 31 | 33 | ||
jashkenas/coffeescript:test/support/helpers.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.arrayEq = (a, b, msg) ->
ok arrayEgal(a, b), msg or
"Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}"
``` | exports.arrayEq = function(a, b, msg) {
return ok(arrayEgal(a, b), msg || `Expected ${reset}${a}${red} to deep equal ${reset}${b}${red}`);
}; | CoffeeScript | JavaScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 31 | 33 |
jashkenas/coffeescript:test/support/helpers.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.arrayEq = function(a, b, msg) {
return ok(arrayEgal(a, b), msg || `Expected ${reset}${a}${red} to deep equal ${reset}${b}${red}`);
};
``` | exports.arrayEq = (a, b, msg) ->
ok arrayEgal(a, b), msg or
"Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}" | JavaScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 31 | 33 |
jashkenas/coffeescript:test/support/helpers.coffee:6:raw_corpus | raw_corpus | exports.eqJS = (input, expectedOutput, msg) ->
actualOutput = CoffeeScript.compile input, bare: yes
.replace /^\s+|\s+$/g, '' # Trim leading/trailing whitespace.
ok egal(expectedOutput, actualOutput), msg or diffOutput expectedOutput, actualOutput | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 35 | 38 | ||
jashkenas/coffeescript:test/support/helpers.coffee:6:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.eqJS = (input, expectedOutput, msg) ->
actualOutput = CoffeeScript.compile input, bare: yes
.replace /^\s+|\s+$/g, '' # Trim leading/trailing whitespace.
ok egal(expectedOutput, actualOutput), msg or diffOutput expectedOutput, actualOutput
``` | exports.eqJS = function(input, expectedOutput, msg) {
var actualOutput;
actualOutput = CoffeeScript.compile(input, {
bare: true
}).replace(/^\s+|\s+$/g, ''); // Trim leading/trailing whitespace.
return ok(egal(expectedOutput, actualOutput), msg || diffOutput(expectedOutput, actualOutput));
}; | CoffeeScript | JavaScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 35 | 38 |
jashkenas/coffeescript:test/support/helpers.coffee:6:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.eqJS = function(input, expectedOutput, msg) {
var actualOutput;
actualOutput = CoffeeScript.compile(input, {
bare: true
}).replace(/^\s+|\s+$/g, ''); // Trim leading/trailing whitespace.
return ok(egal(expectedOutput, actualOutput), msg || diffO... | exports.eqJS = (input, expectedOutput, msg) ->
actualOutput = CoffeeScript.compile input, bare: yes
.replace /^\s+|\s+$/g, '' # Trim leading/trailing whitespace.
ok egal(expectedOutput, actualOutput), msg or diffOutput expectedOutput, actualOutput | JavaScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 35 | 38 |
jashkenas/coffeescript:test/support/helpers.coffee:6:completion | completion | exports.eqJS = (input, expectedOutput, msg) ->
actualOutput = CoffeeScript.compile input, bare: yes | .replace /^\s+|\s+$/g, '' # Trim leading/trailing whitespace.
ok egal(expectedOutput, actualOutput), msg or diffOutput expectedOutput, actualOutput | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/support/helpers.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee | 35 | 38 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.