Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Remove CoffeeScript support #12410

Closed
ariya opened this issue Jul 30, 2014 · 8 comments
Closed

Remove CoffeeScript support #12410

ariya opened this issue Jul 30, 2014 · 8 comments
Assignees
Milestone

Comments

@ariya
Copy link
Owner

ariya commented Jul 30, 2014

This is to reduce maintenance burden since there is not much adoption of CoffeeScript among PhantomJS users. As a workaround, CoffeeScript users can still compile their scripts to JavaScript first before executing it with PhantomJS.

It will only affect PhantomJS >= 2.0.

@ariya ariya added this to the Release 2.0 milestone Jul 30, 2014
ariya added a commit that referenced this issue Jul 30, 2014
@sodabrew
Copy link
Contributor

Oh sad, this was really nice, in particular because CS had a standard library and sane stdin/stdout and command-line parsing, e.g.

helpBanner = '''
PhantomJS drop-in for wkhtmltopdf and wkhtmltoimage by Aaron Stone
Usage: pjhtmltoimage [options] URL filename
'''

switches = [
  ['-h', '--help',            'Display help']
  ['-H', '--extended-help',   'Display more extensive help, detailing less common command switches']
  ['-V', '--version',         'Output version information an exit']
]

optparse = require ':/coffee-script/lib/coffee-script/optparse'
parser  = new optparse.OptionParser switches, helpBanner

fs = require 'fs'
system = require 'system'

options = parser.parse system.args.slice 1
address = options.arguments[0]

output = options.arguments[1]
output = '/dev/stdout' if output is '-'

https://github.com/sodabrew/pjhtmltopdf/blob/master/pjhtmltoimage.coffee

@JamesMGreene
Copy link
Collaborator

@sodabrew You can still just compile the "optparse" Coffee to JS and require the external JS file instead.

shrugs Pretty doubtful anything would change our mind on dropping it when all such compilation can just be handled ahead of time before invoking the main PhantomJS runner script.

@JamesMGreene
Copy link
Collaborator

Closed by 48fabe0.

@sodabrew
Copy link
Contributor

I agree that it's the right thing from a maintenance overhead perspective, I'm only lamenting that I enjoyed the feature and I will miss it.

Huge congratulations on landing Qt5 support - I am very excited for PhantomJS 2.0!

I'll add a coffeescript make file to my project now ::||

@JamesMGreene
Copy link
Collaborator

Who doesn't like cake? 😉

@46bit
Copy link

46bit commented Feb 27, 2015

The website should really be updated to reflect this.

@ariya
Copy link
Owner Author

ariya commented Feb 28, 2015

@46bit Which website? phantomjs.org already has no reference to CoffeeScript. If there is still any, let me know.

@46bit
Copy link

46bit commented Feb 28, 2015

@ariya Apologies, I accidentally posted something for CasperJS here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants