714 Commits

Author SHA1 Message Date
Geoffrey Booth
f9c3316aa5 2.6.0 (#5374) 2021-09-19 14:15:00 -07:00
Erik Demaine
b0946c3c60 Fix documentation links to try/catch section (#5349)
* Fix documentation links to try/catch section

Consistently use `#try-catch` for the section (and `#try` for the demo)

* Fix documentation source
2021-09-15 10:39:38 -07:00
Geoffrey Booth
389ce89555 Run browser tests in headless Chrome; replace Travis and AppVeyor with GitHub Actions (#5298) 2020-05-25 21:03:49 -07:00
Geoffrey Booth
26a7ba1659 2.5.1 (#5297)
* Bump version to 2.5.1

* Changelog for 2.5.1

* Update output for 2.5.1
2020-01-30 22:38:10 -08:00
Daniel Bayley
bb8df1e052 Fix typos (#5287) 2020-01-16 09:54:12 -08:00
Geoffrey Booth
61d408f093 2.5.0 (#5284)
* 2.5.0 changelog

* Update dependencies

* Colors are expected to be globals by the new AST test helpers

* Disable testing of deepStrictIncludeExpectedProperties in browsers for now

* Update output of compiler only

* Update browser compiler output

* Update docs output

* Document ast option

* Update output

* Fix and reenable deepStrict test for browser test suite

* Update output
2019-12-31 22:19:32 -08:00
Geoffrey Booth
92f69b2bca Release 2.4.1 (#5195)
* Fix #5133: Document that braces are required for object shorthand.

* Changelog for 2.4.1

* Update output
2019-04-07 20:41:37 -07:00
Geoffrey Booth
742224471f Actually publish the browser compilers to NPM (#5186)
* Actually publish the browser compilers to NPM

* Transpile and minify modern browser compiler; add to lib/ folder; update docs
2019-04-07 16:09:44 -07:00
Geoffrey Booth
c09d8fbedb Release 2.4.0 (#5182)
* cake doc:site:watch should also watch the changelog files

* Changelog for 2.4.0

* 2.4.0 output
2019-03-30 11:31:22 -07:00
Geoffrey Booth
f6d63776c3 ES module version of compiler for use in browsers; dynamic import() docs; revised Stage 3 policy (#5177)
* Build both a legacy and modern browser compiler

* Dynamic import example and documentation

* Update the docs to use the modern browser compiler if the browser supports it

* Update policy regarding Stage 3 features

* This never made sense, and assigning a string to index 0 *of a string* throws in Module mode (and silently does nothing in Script mode) so remove this unneeded code that throws when compiling `fn for i from from iterable` in Module mode

* Have browser-based tests use the ES module version if supported

* Simplify building logic

* Update output

* For the ES module version of the browser compiler, don't automatically attach the runScripts event handler

* Consistent comments

* Fix comment
2019-03-26 23:55:31 -07:00
Geoffrey Booth
6e86b67818 Release 2.3.2 (#5110)
* Bump version to 2.3.2

* 2.3.2 changelog

* Update output for 2.3.2
2018-09-19 23:53:49 -07:00
Geoffrey Booth
c4245e50c2 Babel 7 (#5105)
* Port to Babel 7

Use the Babel 7 @babel/core transpiler, falling back to the older babel-core version if possible.

* Use Babel 7 and preset-env 7 to build the browser compiler and test Babel transpilation

* Update docs for Babel 7
2018-09-09 13:41:49 -07:00
Geoffrey Booth
7f8b36a8bd Revert "fix momentum scrolling on iOS (#5083)" (#5084)
This reverts commit 812571843c.
2018-06-16 15:35:34 -07:00
Paul Nta
812571843c fix momentum scrolling on iOS (#5083) 2018-06-16 15:32:16 -07:00
Geoffrey Booth
be702d67f3 2.3.1 (#5069)
* Update links to use https://coffeescript.org

* 2.3.1 changelog

* Bump version to 2.3.1; update output

* Forgot one

* Another one

* Lock Babel versions for Node 6 build to succeed, until Babel 7 is out
2018-05-21 22:14:34 -07:00
Geoffrey Booth
68302e6da7 Docs headings and changelog refactor (#5067)
* Changelog sub-sections should use h3, not h2; no need for hack anchor tag anymore

* Internationalize dates to user’s locale

* Consistent names

* Split up the changelog into separate files per version; make HTML markup consistent with the other sections in the docs

* Fix sidebar links for introduction and overview
2018-05-20 09:39:53 -07:00
Geoffrey Booth
d82272b6c2 Fix #1832: Browser compiler should run code using globally-scoped eval (#5047)
* Explicitly turn off minify mangling, because it was previously implicitly disabled by the existence of the `eval` call we’re about to remove

* Update babel-core

* Run browser-compiled scripts using window.eval rather than just eval, to use a clean scope (many times faster)

* Update output

* Fix browser-based test broken by #5028

* Update output
2018-05-01 08:11:40 -07:00
Geoffrey Booth
8061ecf0e2 2.3.0 (#5043)
* Move analytics initialization into docs.coffee

* Bump Bootstrap and CodeMirror versions

* Update output

* Merge CodeMirror styles

* Update CodeMirror styles

* Better flexbox layout for docs, including flex auto-sized sidebar and main column

* Minor styling fixes for Edge

* Fix scrollspy for new layout

* Update output

* Clicking on the CoffeeScript logo in the navbar should scroll to top; fix main column width on mobile

* Update output

* 2.3.0 changelog

* Update operators section for **

* Update docs for ES2018 object rest/spread

* Remove references to Node's experimental modules support

* Move the README coffee cup to the right side, so our name isn't cut off on the NPM page; update README and CONTRIBUTING text

* Update dependencies

* Add compatibility note for async generators

* Bump version to 2.3.0 and update output

* Have CI test in Node 10 instead of 9

* Somehow this gets generated slightly differently in Node 10

* Fix #4042: Update broken link
2018-04-28 18:57:15 -07:00
Geoffrey Booth
6df8f5ff17 Remove references to Node's experimental modules support 2018-04-27 10:27:20 -07:00
Geoffrey Booth
776e7e5328 Docs improvements (#5042)
* Move analytics initialization into docs.coffee

* Bump Bootstrap and CodeMirror versions

* Update output

* Merge CodeMirror styles

* Update CodeMirror styles

* Better flexbox layout for docs, including flex auto-sized sidebar and main column

* Minor styling fixes for Edge

* Fix scrollspy for new layout

* Update output

* Clicking on the CoffeeScript logo in the navbar should scroll to top; fix main column width on mobile

* Update output
2018-04-27 10:07:01 -07:00
Geoffrey Booth
47c491ffa1 Regular expressions s (dotAll) flag (#4880)
* Support ES2018 regex dotall flag

* Test in Node 9

* Alphabetize regex flags

* Split regex dotall test into its own file, use new feature detection method of loading it

* Update docs to explain compatibility for ES2018 and newer Node features

* Remove unnecessary paragraph
2018-03-30 15:25:41 -07:00
Geoffrey Booth
e5aa758dda 2.2.4 (#5025)
* Update changelog for 2.2.4

* Bump version to 2.2.4; update output
2018-03-29 20:00:45 -07:00
Geoffrey Booth
820942c3d0 2.2.3 (#5010)
* Bump version to 2.2.3; update packages

* Update output

* Update changelog
2018-03-11 13:48:14 -07:00
zdenko
7542a75ff8 get/set example (#4990) 2018-02-25 00:18:57 -08:00
Geoffrey Booth
e0833c29ce 2.2.2 (#4986)
* Changelog for 2.2.2

* Bump version to 2.2.2

* Bump dependencies

* Update output
2018-02-22 00:31:14 -08:00
Geoffrey Booth
a73f66bc11 2.2.1 (#4885)
* 2.2.1 changelog

* Bump version to 2.2.1 and update output
2018-02-06 22:28:15 -08:00
Geoffrey Booth
0490eb9a3a 2.2.0 (#4873)
* Changelog for 2.2.0

* Bump version

* Bump package versions

* Fix `cake doc:source` for Docco 0.8.0

* Update output; some text tweaks
2018-02-01 20:14:26 -08:00
Geoffrey Booth
12fcbfc654 2.1.1 (#4835)
* Bump version to 2.1.1

* 2.1.1 changelog

* 2.1.1 updated output
2017-12-29 16:54:57 -08:00
Geoffrey Booth
926cb8463c 2.1.0 (#4823)
* Changelog for 2.1.0; remove text from objects section that is no longer valid for CS2/ES2015.

* Update packages

* 2.1.0 build

* Update output

* Correct reference to `//` division, per https://github.com/coffeescript6/discuss/issues/39#issuecomment-347144647
2017-12-10 23:12:33 -08:00
Geoffrey Booth
64b8dd486a 2.0.3 (#4795)
* Fix #4775: Remove no-longer-correct mention of the docs using text/coffeescript

* 2.0.3 changelog

* Update output for 2.0.3

* Bump date
2017-11-26 19:29:08 -08:00
Geoffrey Booth
cbc695b831 2.0.2 (#4758)
* Give the notes about `super` and `this` their own section in the docs

* 2.0.2 changelog

* 2.0.2 release output

* Rewrite
2017-10-26 18:29:45 -07:00
Geoffrey Booth
0b0a9ef2c4 2.0.1 (#4719)
* 2.0.1 changelog

* Version bump to 2.0.1
2017-09-26 20:16:16 -07:00
Geoffrey Booth
9df1457c55 Fix #4703, 4713: Transpile fixes (#4717)
* Show an appropriate error if the user tries to use --transpile via the CLI and babel-core isn’t installed

* Update documentation around global/local

* Fix #4713: Use Babel’s built-in `filename` option to let Babel search for its options, rather than us doing so

* Improve transpilation docs

* Colons are good

* Docs cleanup

* Rewrite transpilation docs

* Better identifier for compiled scripts that didn’t come from files; better resolving of paths
2017-09-26 09:20:13 -07:00
James Kyle
22f92f23ae Add example of comment include type annotation (#4705)
* Add example of comment include type annotation

* build website
2017-09-25 18:25:55 -07:00
Geoffrey Booth
5cbd25f5d4 Docs fixes (#4707)
* Mobile Safari needs the code to be >= 16px

* Buttons that just run the code shouldn’t have a label, since in all the other examples the label signifies the command to be run

* Use Bootstrap’s breakpoints

* Use Bootstrap’s styling for the <code> element, to avoid misaligned baseline

* Updated output

* Fix #4704: use replaceState, so that back/forward only happen for user clicks on links; opening and closing Try CoffeeScript doesn’t count as a new history entry, and closing it retrieves the previous URL

* Fix #4702: Some changelog entries are more equal than others

* Updated output

* Eliminate the 1px jitter when initializing code editors

* On first time opening Try CoffeeScript, use just #try as the hash

* Update output

* Increase general body line spacing

* Code styling per Jeremy

* Don’t let the main text column grow unreasonably wide

* Give list items some modest bottom margin (and use ems whenever possible)

* Updated output
2017-09-20 13:10:48 -07:00
jz5
42da56deb1 Fix link to logo 2017-09-19 16:47:32 +09:00
Jeremy Ashkenas
81260bff7d boom 2017-09-18 18:23:27 -04:00
Jeremy Ashkenas
c17b6b8863 fix the code popping 2017-09-18 16:06:11 -04:00
Jeremy Ashkenas
1965996933 slightly less cramped code 2017-09-18 14:06:45 -04:00
Jeremy Ashkenas
a67dfae985 Tweaking font sizes. 2017-09-18 14:04:04 -04:00
Jeremy Ashkenas
1cb733989c Removing slightly defensive and slightly incorrect 'why coffeescript' section 2017-09-18 13:56:02 -04:00
Geoffrey Booth
19231dbcad 2.0.0 (#4701)
* 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
2017-09-18 08:19:19 -07:00
Geoffrey Booth
4c41831474 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
2017-09-16 11:57:18 -07:00
Geoffrey Booth
659f1b3c4c Update transpilation docs (#4700) 2017-09-16 09:32:48 -07:00
Geoffrey Booth
f51c1a150b 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
2017-09-15 06:58:18 -07:00
Geoffrey Booth
63d3b699d7 [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
2017-09-07 08:01:12 -07:00
Geoffrey Booth
df9d4a2343 [CS2] 2.0.0-beta5 (#4682)
* Upgrade docs to Bootstrap 4 beta, including refactoring styles; upgrade docs jQuery and CodeMirror

* Better style the docs for mobile, including Try CoffeeScript

* Fix #4642, erroneous statement about named functions

* Update packages

* 2.0.0-beta5
2017-09-02 12:48:38 -07:00
Geoffrey Booth
9e043bbae7 [CS2] Fix async tests (#4680)
* Get `coffee` command working again in Node 6, by converting the ‘await’ wrapper in the REPL to use a Promise instead of the ‘await’ keyword; add tests for REPL ‘await’ wrapper, including test to skip async tests if the runtime doesn’t support them

* Fix async tests: now if a test function is a Promise (which an `await` function is), we add it to an array of async test functions and wait for them all to resolve before finishing the test run, so that if any async tests fail we see those failures in the output

* Code review

* Unnecessary

* Let's support Node 6+ if we can

* Simplify the returned promise

* Simplify async check
2017-09-01 12:26:47 -07:00
Julian Rosse
b20e52da99 [CS2] use _extends utility instead of Object.assign() for object spreads (#4675)
* _extends utility instead of Object.assign()

* eqJS test for _extends

* Test that a user-defined function named `_extends` doesn’t conflict with our utility function

* IE8 polyfill note in docs
2017-09-01 07:09:16 -07:00
Geoffrey Booth
fe5ff39ca2 [CS2] Fix v3 source map (#4671)
* Per discussion in #3075: if `sourceFiles` is unspecified, but `filename` is, use `filename`; output null instead of an empty string for `sources` or `sourceRoot`

* Update source map tests to reflect that now we return null instead of empty strings; check generated sources array

* Update source map documentation; still leave more obscure options undocumented

* Follow the TypeScript compiler’s example regarding v3SourceMap, but output empty strings instead of made-up filenames

* Have `sources` default to ‘<anonymous>’
2017-09-01 01:06:45 -07:00