Import coffeescript 1.2.0
CoffeeScript is a little language that compiles into JavaScript. Underneath all those awkward braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without warnings, will work in every JavaScript implementation, and tends to run as fast or faster than the equivalent handwritten JavaScript. Feedback and OK jasper@
This commit is contained in:
parent
719b3e2527
commit
077a4f1628
36
lang/coffeescript/Makefile
Normal file
36
lang/coffeescript/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2011/12/19 22:21:47 jeremy Exp $
|
||||
|
||||
COMMENT = little language that compiles to javascript
|
||||
|
||||
DISTNAME = coffeescript-1.2.0
|
||||
CATEGORIES = lang
|
||||
|
||||
HOMEPAGE = http://coffeescript.org
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
PERMIT_DISTFILES_CDROM = Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
|
||||
MASTER_SITES = http://distfiles.nl/
|
||||
|
||||
BUILD_DEPENDS = ${RUN_DEPENDS}
|
||||
RUN_DEPENDS = www/node
|
||||
|
||||
GIT_SHA1 = 9abe614
|
||||
WRKDIST = ${WRKDIR}/jashkenas-coffee-script-${GIT_SHA1}
|
||||
|
||||
NO_BUILD = Yes
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/Cakefile
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} HOME=${WRKSRC} \
|
||||
${SUDO} bin/cake --prefix ${PREFIX} install
|
||||
|
||||
do-regress:
|
||||
cd ${WRKSRC} && bin/cake test
|
||||
|
||||
.include <bsd.port.mk>
|
5
lang/coffeescript/distinfo
Normal file
5
lang/coffeescript/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (coffeescript-1.2.0.tar.gz) = Xfw+4hIU8bfobAU19ThqNQ==
|
||||
RMD160 (coffeescript-1.2.0.tar.gz) = YnbH/znZSUxB+DIL/BrLveJs51k=
|
||||
SHA1 (coffeescript-1.2.0.tar.gz) = iKUwy6jLaTzQZ/k3aFIJOFM31vQ=
|
||||
SHA256 (coffeescript-1.2.0.tar.gz) = 9QJxODduCW+//O8G93chO4o72FKvshD/LH0e6P/bCeA=
|
||||
SIZE (coffeescript-1.2.0.tar.gz) = 452704
|
23
lang/coffeescript/patches/patch-Cakefile
Normal file
23
lang/coffeescript/patches/patch-Cakefile
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-Cakefile,v 1.1.1.1 2011/12/19 22:21:47 jeremy Exp $
|
||||
--- Cakefile.orig Tue Nov 8 15:01:45 2011
|
||||
+++ Cakefile Tue Dec 13 14:52:16 2011
|
||||
@@ -50,17 +50,12 @@ task 'install', 'install CoffeeScript into /usr/local
|
||||
base = options.prefix or '/usr/local'
|
||||
lib = "#{base}/lib/coffee-script"
|
||||
bin = "#{base}/bin"
|
||||
- node = "~/.node_libraries/coffee-script"
|
||||
console.log "Installing CoffeeScript to #{lib}"
|
||||
- console.log "Linking to #{node}"
|
||||
- console.log "Linking 'coffee' to #{bin}/coffee"
|
||||
exec([
|
||||
"mkdir -p #{lib} #{bin}"
|
||||
"cp -rf bin lib LICENSE README package.json src #{lib}"
|
||||
- "ln -sfn #{lib}/bin/coffee #{bin}/coffee"
|
||||
- "ln -sfn #{lib}/bin/cake #{bin}/cake"
|
||||
- "mkdir -p ~/.node_libraries"
|
||||
- "ln -sfn #{lib}/lib/coffee-script #{node}"
|
||||
+ "ln -sfn ${TRUEPREFIX}/lib/coffee-script/bin/coffee #{bin}/coffee"
|
||||
+ "ln -sfn ${TRUEPREFIX}/lib/coffee-script/bin/cake #{bin}/cake"
|
||||
].join(' && '), (err, stdout, stderr) ->
|
||||
if err then console.log stderr.trim() else log 'done', green
|
||||
)
|
12
lang/coffeescript/pkg/DESCR
Normal file
12
lang/coffeescript/pkg/DESCR
Normal file
@ -0,0 +1,12 @@
|
||||
CoffeeScript is a little language that compiles into JavaScript.
|
||||
Underneath all those awkward braces and semicolons, JavaScript has
|
||||
always had a gorgeous object model at its heart. CoffeeScript is an
|
||||
attempt to expose the good parts of JavaScript in a simple way.
|
||||
|
||||
The golden rule of CoffeeScript is: "It's just JavaScript". The code
|
||||
compiles one-to-one into the equivalent JS, and there is no
|
||||
interpretation at runtime. You can use any existing JavaScript library
|
||||
seamlessly from CoffeeScript (and vice-versa). The compiled output is
|
||||
readable and pretty-printed, passes through JavaScript Lint without
|
||||
warnings, will work in every JavaScript implementation, and tends to run
|
||||
as fast or faster than the equivalent handwritten JavaScript.
|
40
lang/coffeescript/pkg/PLIST
Normal file
40
lang/coffeescript/pkg/PLIST
Normal file
@ -0,0 +1,40 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/12/19 22:21:47 jeremy Exp $
|
||||
bin/cake
|
||||
bin/coffee
|
||||
lib/coffee-script/
|
||||
lib/coffee-script/LICENSE
|
||||
lib/coffee-script/README
|
||||
lib/coffee-script/bin/
|
||||
lib/coffee-script/bin/cake
|
||||
lib/coffee-script/bin/coffee
|
||||
lib/coffee-script/lib/
|
||||
lib/coffee-script/lib/coffee-script/
|
||||
lib/coffee-script/lib/coffee-script/browser.js
|
||||
lib/coffee-script/lib/coffee-script/cake.js
|
||||
lib/coffee-script/lib/coffee-script/coffee-script.js
|
||||
lib/coffee-script/lib/coffee-script/command.js
|
||||
lib/coffee-script/lib/coffee-script/grammar.js
|
||||
lib/coffee-script/lib/coffee-script/helpers.js
|
||||
lib/coffee-script/lib/coffee-script/index.js
|
||||
lib/coffee-script/lib/coffee-script/lexer.js
|
||||
lib/coffee-script/lib/coffee-script/nodes.js
|
||||
lib/coffee-script/lib/coffee-script/optparse.js
|
||||
lib/coffee-script/lib/coffee-script/parser.js
|
||||
lib/coffee-script/lib/coffee-script/repl.js
|
||||
lib/coffee-script/lib/coffee-script/rewriter.js
|
||||
lib/coffee-script/lib/coffee-script/scope.js
|
||||
lib/coffee-script/package.json
|
||||
lib/coffee-script/src/
|
||||
lib/coffee-script/src/browser.coffee
|
||||
lib/coffee-script/src/cake.coffee
|
||||
lib/coffee-script/src/coffee-script.coffee
|
||||
lib/coffee-script/src/command.coffee
|
||||
lib/coffee-script/src/grammar.coffee
|
||||
lib/coffee-script/src/helpers.coffee
|
||||
lib/coffee-script/src/index.coffee
|
||||
lib/coffee-script/src/lexer.coffee
|
||||
lib/coffee-script/src/nodes.coffee
|
||||
lib/coffee-script/src/optparse.coffee
|
||||
lib/coffee-script/src/repl.coffee
|
||||
lib/coffee-script/src/rewriter.coffee
|
||||
lib/coffee-script/src/scope.coffee
|
Loading…
x
Reference in New Issue
Block a user