Questions tagged [coffeescript]

A language that transpiles to JavaScript. Use this tag for questions about programming with the CoffeeScript language.

From the CoffeeScript Homepage:

CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

CoffeeScript can be used in any JavaScript environment. Included in a web page, it supports <script type="text/coffeescript"> tags; with node.js it can compile code on the command line, and it is also available as a Ruby gem.

The documentation and downloads can be found on the CoffeeScript website.

Common causes of unexpected behavior

  • Check your whitespace. Indentation is SIGNIFICANT. Mixing SPACE and TAB in indentation will create problems. Make sure you understand the rules for whitespace and make sure you triple-check this.

Popular questions

###Freely available CoffeeScript programming books

Video Tutorial

Codeschool CoffeeScript Tutorial - Awesome place to start with CoffeeScript.

9747 questions
3
votes
1 answer

Exception while simulating the effect of invoking 'upvote'. TypeError: undefined is not a function

trying to add “upvoting" to specific courses for Crowducate.me. As you see from the image, the method is properly called. However, I think the update method (mongo) is not understood. Here’s my personal source code with all commits on Github. My…
Amir Rahbaran
  • 2,380
  • 2
  • 21
  • 28
3
votes
1 answer

Pixi.js sprites "shake" when other sprite rotated

I'm working on a Pixi.js game in Coffeescript that mainly focuses on rotating hexes. Everything about the rotation is working correctly in terms of animating the rotation and the underlying board state recognizing the rotation. However, for certain…
Mshnik
  • 7,032
  • 1
  • 25
  • 38
3
votes
0 answers

JavaScript sourcemap 404 error as source not web accessible

I use grunt-contrib-coffee to generate my source maps and they all point to the correct location of the source .coffeescript files but they 404 as the /app/ folder is above the webroot which is /dist/. Directory structure: /app/ …
Craig
  • 972
  • 3
  • 13
  • 38
3
votes
1 answer

jQuery UI date picker makes problems with mobile devices

We are using this jQuery UI date picker wrapper which is working fine for the Desktop version of the site. But we do have a huge problem when it comes to a mobile device. Then when I click on the input field, the datepicker shows up and additionally…
lumio
  • 7,428
  • 4
  • 40
  • 56
3
votes
1 answer

how to work with large files, NodeJS streams, and pipes

i'm somewhat new to NodeJS streams, and the more i learn about it, the more i believe it's not a particularly simple and stable thing. i'm attempting to read big files with csv / csv-parse (apparently the most popular CSV module with NodeJS) using…
flow
  • 3,624
  • 36
  • 48
3
votes
0 answers

IntelliJ - compile all CoffeeScript files at once

I use a CoffeeScript file watcher in IntelliJ to compile my CoffeeScript files. However, when I start the IDE, it does not interpret the files immediately. In the project structure, there are two files visible: When I open the coffee file and…
fracz
  • 20,536
  • 18
  • 103
  • 149
3
votes
2 answers

Why does systemd service running Node.js app show state of failed when stopped properly?

I have a systemd service file that is running a Node.js app. The service seems to run fine, but when I stop the service, using systemctl stop train the service enters a failed state. [root@localhost portaj]# systemctl stop train [root@localhost…
Jonathan
  • 5,495
  • 4
  • 38
  • 53
3
votes
3 answers

How to get the coffeescript working in Play framework 2.3.1?

I am following the "Using Play Framework with scala" tutorial. I am able to follow all the steps except the last one to use the coffeescript with jquery. I can see the javascript file getting generated, but in the browser, I am seeing this…
Gaurav Abbi
  • 645
  • 9
  • 23
3
votes
1 answer

Problems with angular promises' responses in services

I'm working with angular 1.2.18 for the first time. I am using it with rails 3.2 and coffeescript. I am trying to use a promise in a service to fetch some data that I will then use to populate a template. My code looks like…
3
votes
1 answer

Webpack multiple named chunks ignoring names at runtime

I am having trouble with webpacks code splitting functionality. I am trying to have 2 named chunks for two routes in my application which are not often visited. mysite.com/settings and mysite.com/access. here is my…
Brenwell
  • 767
  • 10
  • 24
3
votes
1 answer

Stop mongoose connection that prevent app termination

I'm creating an a terminal application that uses mongoose for single insert and read operation per execution. I use the following code as a database util for my app require '../objs/' mongoose = require 'mongoose' class DbManager constructor:…
Sameh K. Mohamed
  • 2,323
  • 4
  • 29
  • 55
3
votes
1 answer

How can i synchronous test with supertest

codes: should = require('should') request = require('supertest') request = request("stackoverflow.com"); describe "temp", -> input_output = [ { input:"[mocha] [supertest]", output: ["asdf", "asdf"] } { input:"아버지가방에들어가신다",…
3
votes
1 answer

Using Asset Pipeline in Rails View

I have a Coffeescript view, something like widget.js.coffee which needs to include jQuery, as I can't be sure that jQuery is available. This idea is for other people to use the JS file, e.g.
Scott Arbeitman
  • 311
  • 2
  • 15
3
votes
1 answer

What is scope.$$childHead?

I decided it's time for me to explore the hidden side of testing directives, and now when I do something with a directive that has an isolated scope: parentScope = $rootScope.$new() parentScope.dasDingy = "bla bla dingy" element =…
iLemming
  • 34,477
  • 60
  • 195
  • 309
3
votes
0 answers

Amazon Signature Version 4 Calculation

I'm trying to calculate the same situation as shown here Following is a snippet of coffeescirpt that uses CryptoJS. The EncodedPolicy is correct according to the example. hmac = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, "AWS4" +…
jimmiebtlr
  • 438
  • 4
  • 14
1 2 3
99
100