[CS2] Fix CS2 docs mobile issues, improve performance (#4688)
* Get rid of offcanvas slide-in; fix sidebar * We need to transpile docs.coffee, since Safari 9 throws an error on it and that’s too new a browser not to support; but this should also speed things up * Fix some tabs * Fix scrollbar * Use Highlight.js to format placeholder code (during compilation, not rendering) before CodeMirror loads; match Highlight.js styles to CodeMirror styles as best we can * Improve hash management * Initialize CodeMirror on demand, on mouseover a particular code example, rather than all examples on startup * Replace highlight.js with Prism for placeholder syntax highlighting * Scratch Prism, use CodeMirror itself to do Node-based syntax highlighting, so that on CodeMirror initialization there’s no flash from mismatched highlighting * Update packages; there’s a new version of Jison! (doesn’t change much) * Fix mobile issues: use SVG play button icon, to avoid iOS blue square play button; make the code editor text 16px size explicit, to avoid unwanted mobile zoom; make the ‘code play’ buttons work even if the code examples are in placeholder (non-editable) mode, in case a user hasn’t moused over/tapped them * Update docs output * Whoops, CodeMirror is only a devDependency
Option to transpile with Babel (#4697)
* Upgrade Babeli (now babel-minify) which fixes the bug that was forcing us to run Babel twice for transpilation * Add --transpile option (WIP) * Node API always compiles a string, so it doesn’t need the option to pass a path to an options file, it can always just pass an object to `transpile`; get `transpile` working with `eval` * Not allowing argument to `--transpile` so don’t need to cover so many cases * Don’t need to worry about `sourceMaps` option to pass to Babel, `inputSourceMap` overrides it * Rewrite Webpack test to use Node API * Make the compiler safe again for browsers and Webpack/Browserify * Node version of CoffeeScript.compile passes reference to Babel if transpile is requested * Test Node API for transpile option * Test for merged source maps * Test for Node API error message * Only stop searching for Babel options if a package.json has a truthy "babel" key * Update docs
CoffeeScript 2 announcement (#4695)
* CoffeeScript 2 announcement, first draft * Lydell's notes * Jeremy’s notes; Rollup is not a transpiler * Revise “unsupported features” section * Fix links, invalid HTML * Announcing CoffeeScript 2 HTML page * Link to the announcement * Add some references * Fix anchors * Better example
* Bump version to 2.0.0; bump dependencies versions * Make v2 docs the primary docs; jettison the v1 docs’ source: whenever the v1 docs need to be rebuild in the future, that can be done on the `1` branch and copied over; simplify folder tree * Updated v1 docs that reflect that v2 is out and have updated paths to reflect that the v2 docs are now the primary docs, and the v1 docs only live under /v1/ * Add Google Analytics; track navigation, editing code and running code * 2.0.0 changelog * Fix link to root docs * No more @next; installing local copy should be --save-dev * Analytics on the browser-based tests page should prove fascinating . . . * Update annotated source * Add note to changelog clarifying scope