Commit Graph

259 Commits

Author SHA1 Message Date
Geoffrey Booth 277975e33a [CS2] Replace Closure Compiler with Babili, transform browser compiler into ES5-ish (#4523)
* Swap Google Closure Compiler for Babili

* Browser compiler, minified by Babili

* Use Babel to transform, not just to minify; add process.env.TRANSFORM to disable transforming if we only want to minify. Unfortunately several browser tests fail when transformed . . .

* Move `super()` calls so that the Babel-transformed browser compiler passes all the browser tests (in Node, at least)

* Updated browser build

* Update browser tests
2017-04-26 16:21:29 -07:00
Geoffrey Booth 0e8feb7ee9 [CS2] Literate CoffeeScript without dependencies (#4509)
* Reimplement `invertLiterate` without any dependency, tracking indentation levels (including inside lists); update literate test files to also check that no tests are skipped

* Drop Literate CoffeeScript’s support for executable code blocks inside list items (and also for second paragraphs or blockquotes in list items)

* Update Literate CoffeeScript docs to reflect current supported syntax
2017-04-17 23:30:40 -07:00
Geoffrey Booth ae096a331a Merge branch 'master' into 2
# Conflicts:
#	Cakefile
#	documentation/sections/changelog.md
#	documentation/sections/classes.md
#	documentation/sections/fat_arrow.md
#	documentation/sections/installation.md
#	documentation/sections/introduction.md
#	documentation/sections/resources.md
#	documentation/sections/scripts.md
#	lib/coffeescript/repl.js
#	src/lexer.coffee
2017-04-17 19:52:34 -07:00
Geoffrey Booth faf6d179be `cake build:browser` should just assemble the browser build, not also test it; add `cake build:browser:full` to additionally run the tests 2017-04-15 13:51:11 -07:00
Geoffrey Booth d141d5c9ae If the tests fail, return a non-zero exit code 2017-04-15 13:44:14 -07:00
Geoffrey Booth db216ec384 [CS2] 2.0.0-beta1 (#4499)
* Fix browser build to incorporate Markdown-It, not Marked

* Update Google Closure Compiler; recompile browser build but with MINIFY=false, because Closure Compiler throws an error on our current code; see https://github.com/google/closure-compiler-js/issues/59

* Bump version to 2.0.0-beta1; do release build, with updated docs and annotated source
2017-04-13 10:42:32 -07:00
Geoffrey Booth 72cf485dce 1.12.5 (#4495)
* Use Markdown-It instead of Marked for generating the docs; update package versions

* Fix links to v2 docs

* Bump version to 1.12.5; update changelog and compiled docs output

* Update compiled output for 1.12.5

* Improve styling for tables
2017-04-10 09:30:36 -07:00
Geoffrey Booth d20f54967e [CS2] 2.0.0-beta1 docs (#4494)
* Update package versions; remove marked

* Revise docs to use Markdown-It: tables are now GitHub-Flavored Markdown tables, avoid hack of blockquoted code blocks

* Add anchors for sub-sections

* Add syntax highlighting to uneducable code blocks; fix missing italics variant for comments font

* Update docs about breaking changes in Literate CoffeeScript, move Breaking Changes section below Literate CoffeeScript section

* Update docs regarding destructuring default values breaking change

* Update changelog, with spitball release date for beta1

* Fix highlight function return statement
2017-04-09 23:07:58 -07:00
Geoffrey Booth 06f6efa6d5 Bump minimum Node version to 7.6, which has non-harmony support for async/await; make async tests always enabled, not just for harmony mode 2017-04-02 22:05:09 -07:00
Geoffrey Booth 221a8720fe Merge branch '2' into 2.0.0-alpha1
# Conflicts:
#	Cakefile
#	README.md
#	documentation/sections/changelog.md
2017-02-18 18:36:15 -05:00
Geoffrey Booth e88619a3bb Merge branch 'master' into 2
# Conflicts:
#	documentation/sections/resources.md
#	lib/coffee-script/browser.js
#	lib/coffee-script/cake.js
#	lib/coffee-script/coffee-script.js
#	lib/coffee-script/command.js
#	lib/coffee-script/grammar.js
#	lib/coffee-script/helpers.js
#	lib/coffee-script/index.js
#	lib/coffee-script/lexer.js
#	lib/coffee-script/nodes.js
#	lib/coffee-script/optparse.js
#	lib/coffee-script/register.js
#	lib/coffee-script/repl.js
#	lib/coffee-script/rewriter.js
#	lib/coffee-script/scope.js
#	lib/coffee-script/sourcemap.js
#	package.json
2017-02-18 10:52:55 -05:00
Geoffrey Booth 98c1a3a045 Refactor Cake tasks (#4440)
* Node comes with NPM nowadays, so there’s not really a reason to install CoffeeScript the non-NPM way

* The cake documentation tasks should each have build and watch modes following the same form

* Refactor the build tasks to be more foolproof, including the parser unless it’s explicitly excluded

* Abstract out testing built code, to prepare for watching the build task

* Cake task to cut a new release

* cake build:watch, based on https://github.com/GeoffreyBooth/coffeescript-gulp

* Coding style

* Tests shouldn’t write files in a watched folder

* Don’t crash if the REPL test history file is already gone by the time we try to delete it
2017-02-18 02:47:02 -05:00
Geoffrey 4cc701a9da Remove hyphen in `coffee-script` 2017-02-12 17:00:05 -08:00
Geoffrey Booth 48eb173bcd Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts:
#	lib/coffee-script/nodes.js
#	test/error_messages.coffee
2017-01-22 16:32:38 -08:00
Geoffrey Booth 3108244c20 Fix stack trace (#4428)
* Revert aee27fbff0

* Patch Jison’s output so that it requires `fs` only if we’re truly in a CommonJS/Node environment, not a browser environment that may happen to have globals named `require` and `exports` (as would be the case if require.js is being used). Fixes #4391.

* Temporary fix for exceptions getting thrown when trying to generate a stack trace for a file that has been deleted since compilation; fixes #3890, but not well. A better solution would not try to recompile the file when trying to retrieve its stack trace.

* Save the test REPL history in the system temp folder, not in the CoffeeScript project folder

* Rewrite `getSourceMap` to never read a file from disk, and therefore not throw IO-related exceptions; source maps are either retrieved from memory, or the related source code is retrieved from memory to generate a new source map. Fixes #3890 the proper way.

* Add test to verify that stack traces reference the correct line number. Closes #4418.

* Get the parser working in the browser compiler again; rather than detecting a CommonJS environment generally, just check for `fs` before trying to use it

* Follow Node’s standard of 4-space indentation of stack trace data

* Better .gitignore

* Fix caching of compiled code and source maps; add more tests to verify correct line numbers in stack traces

* Better fallback value for the parser source

* Fix the stack traces and tests when running in a browser

* Update the browser compiler so that @murrayju doesn’t have any extra work to do to test this branch
2017-01-22 13:20:18 -08:00
Geoffrey Booth e620434a2e Docs improvements: content in Markdown, organization into subtemplates, fixed tests (#4401)
* Replace tiny bitmaps with base64-encoded URIs

* Optimize SVGs; replace logo PNG with SVG

* Modernize favicon

* Embed CSS; a bit unorthodox, but we’re a single page so there’s no point in separate .css files and their separate HTTP requests

* Documentation is now markdown, converted to HTML on compilation

* Render the examples when we’re rendering index.html; they compile so quickly that there’s no need to pre-render them and save the intermediate .js files

* Split apart index.html into components that Cakefile assembles, so that we can add in logic to include different files for v1 versus v2

* Split building index.html and building test.html into two tasks; collapse the parts of `releaseHeader` into one compact function

* Move include logic into templates

* Get error messages tests to work in the browser

* Update output index.html

* Split body into nav and body

* Watch subtemplates

* Revert "Split body into nav and body"

This reverts commit ec9e559ec0.

* Add marked

* Update gitignore

* Use idiomatic markdown output for code blocks (<pre><code>)

* Handle ids within the template, not in the Cakefile; remove marked’s auto-generated and conflicting ids

* Move the `codeFor` function into versioned folders, so that v1 and v2 docs can have different example code blocks/editors

* Update packages, including new highlight.js which supports our newer keywords and triple backticks (docs output is unchanged)
2016-12-15 21:05:44 -08:00
Geoffrey Booth 2a862d533f Merge branch 'master' of github.com:jashkenas/coffeescript into 2-docs
# Conflicts:
#	Cakefile
#	lib/coffee-script/coffee-script.js
#	src/coffee-script.coffee
2016-12-15 21:01:52 -08:00
Geoffrey Booth be0f1cb8db DRY on the version number: it should be in package.json and nowhere else (#4400) 2016-12-15 20:52:31 -08:00
Jan 81174187f5 Fix empty source file when building with MINIFY=false, closes #4403 (#4404) 2016-12-15 20:35:10 -08:00
Geoffrey Booth e90cf16965 Merge branch 'improve-docs' into 2-docs 2016-12-12 22:52:14 -08:00
Geoffrey Booth 59001f2fe3 Move the `codeFor` function into versioned folders, so that v1 and v2 docs can have different example code blocks/editors 2016-12-12 22:50:30 -08:00
Geoffrey Booth 80fdc6ecc3 Merge branch 'improve-docs' into 2-docs 2016-12-11 20:29:35 -08:00
Geoffrey Booth ff1725b367 Handle ids within the template, not in the Cakefile; remove marked’s auto-generated and conflicting ids 2016-12-11 20:29:08 -08:00
Geoffrey Booth 4aa0130a92 Use idiomatic markdown output for code blocks (<pre><code>) 2016-12-11 17:12:29 -08:00
Geoffrey Booth c7ad70731a Merge branch 'improve-docs' into 2-docs 2016-12-11 16:55:12 -08:00
Geoffrey Booth 16dda9c496 Use idiomatic markdown output for code blocks (<pre><code>) 2016-12-11 15:46:38 -08:00
Geoffrey Booth d61d4272ce Watch subtemplates 2016-12-11 00:13:53 -08:00
Geoffrey Booth 618e851cd6 Watch subtemplates 2016-12-11 00:13:44 -08:00
Geoffrey Booth 07e4047b7f Merge branch 'improve-docs' into 2-docs 2016-12-10 23:42:57 -08:00
Geoffrey Booth eb36d6e7a2 Get error messages tests to work in the browser 2016-12-10 23:25:20 -08:00
Geoffrey Booth 000dc03360 Move include logic into templates 2016-12-10 22:21:12 -08:00
Geoffrey Booth 0dd727e6eb Split building index.html and building test.html into two tasks; collapse the parts of `releaseHeader` into one compact function 2016-12-10 19:13:37 -08:00
Geoffrey Booth 6a845aa4f6 Split apart index.html into components that Cakefile assembles, so that we can add in logic to include different files for v1 versus v2 2016-12-10 18:53:58 -08:00
Geoffrey 9eb7c63158 Render the examples when we’re rendering index.html; they compile so quickly that there’s no need to pre-render them and save the intermediate .js files 2016-12-10 11:52:42 -08:00
Geoffrey Booth c7539e3310 Documentation is now markdown, converted to HTML on compilation 2016-12-08 00:20:52 -08:00
Geoffrey Booth b481bd1f73 Merge branch 'master' into 2 2016-12-07 20:35:30 -08:00
Geoffrey Booth 8fbe095e94 Improve docs (#4396)
* Replace tiny bitmaps with base64-encoded URIs

* Optimize SVGs; replace logo PNG with SVG

* Modernize favicon

* Embed CSS; a bit unorthodox, but we’re a single page so there’s no point in separate .css files and their separate HTTP requests
2016-12-07 14:23:05 -08:00
Geoffrey Booth 2392a91033 Embed CSS; a bit unorthodox, but we’re a single page so there’s no point in separate .css files and their separate HTTP requests 2016-12-06 22:27:08 -08:00
Geoffrey Booth d524dc8ad0 Optimize SVGs; replace logo PNG with SVG 2016-12-06 22:13:47 -08:00
Geoffrey Booth fb3e1a8e65 Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts:
#	docs/v1/browser-compiler/coffee-script.js
#	lib/coffee-script/browser.js
#	lib/coffee-script/cake.js
#	lib/coffee-script/coffee-script.js
#	lib/coffee-script/command.js
#	lib/coffee-script/grammar.js
#	lib/coffee-script/helpers.js
#	lib/coffee-script/index.js
#	lib/coffee-script/lexer.js
#	lib/coffee-script/nodes.js
#	lib/coffee-script/optparse.js
#	lib/coffee-script/register.js
#	lib/coffee-script/repl.js
#	lib/coffee-script/rewriter.js
#	lib/coffee-script/scope.js
#	lib/coffee-script/sourcemap.js
#	package.json
#	src/coffee-script.coffee
#	src/nodes.coffee
2016-12-04 12:52:23 -08:00
Geoffrey Booth 7d6a3b5fa4 Docs examples with quotation marks were broken. Properly escape the quotes. http://stackoverflow.com/a/1082558/223225 2016-11-30 22:23:51 -08:00
Geoffrey Booth 6d507b46d3 Bump version to 1.12.0; pass through as a variable to index.html 2016-11-30 20:48:06 -08:00
Geoffrey Booth ba3411a1ac Merge branch 'master' of github.com:jashkenas/coffeescript into 2 2016-11-30 19:51:55 -08:00
Geoffrey Booth cf3a27259a Exclude error messages from browser-based tests; watch test files 2016-11-30 00:31:18 -08:00
Geoffrey Booth 729fec2947 Abstract the `eq` and `arrayEq` functions, shared by Cakefile and test.html, into one file that can be included into both 2016-11-29 21:19:11 -08:00
Geoffrey Booth 06b3180223 Refactor test.html to be part of the docs output, with the tests embedded inside it; update test.html styles; move UTF-8 comment test out of test.html and into test/comments.coffee where it belongs 2016-11-29 18:13:12 -08:00
Geoffrey Booth 6d29086519 Standardize on .html file extension; move test.html into its new home 2016-11-29 08:45:46 -08:00
Geoffrey Booth a401f587c3 Organize Cakefile: move helper functions that are only used by `doc:site` into the `doc:site` task 2016-11-29 08:39:00 -08:00
Geoffrey Booth 6685771255 Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts:
#	package.json
2016-11-29 08:26:49 -08:00
Geoffrey Booth ac26360fdc Replace Uglify.js with Google Closure Compiler, JS version; let NPM finally reformat package.json the way it likes (#4376) 2016-11-28 23:10:17 -08:00